@storm-software/git-tools 2.38.3 → 2.40.0
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/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/bin/git.js +56 -54
- package/package.json +1 -1
- package/src/cli/index.js +45 -43
- package/src/index.js +46 -44
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 2.40.0 (2024-08-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
- **git-tools:** Ensure `.git/COMMIT_EDITMSG` exists before reading from disk ([7abae7ae](https://github.com/storm-software/storm-ops/commit/7abae7ae))
|
|
7
|
+
|
|
8
|
+
## 2.39.0 (2024-08-01)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
- **git-tools:** Update `commitlint` to warn users when no commit message is provided instead of throwing errors ([04942ee2](https://github.com/storm-software/storm-ops/commit/04942ee2))
|
|
14
|
+
|
|
1
15
|
## 2.38.3 (2024-07-31)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/bin/git.js
CHANGED
|
@@ -1489,7 +1489,7 @@ var require_jiti = __commonJS({
|
|
|
1489
1489
|
if (0 === path13.length) return ".";
|
|
1490
1490
|
const isUNCPath = (path13 = normalizeWindowsPath2(path13)).match(_UNC_REGEX2), isPathAbsolute = isAbsolute3(path13), trailingSeparator = "/" === path13[path13.length - 1];
|
|
1491
1491
|
return 0 === (path13 = normalizeString2(path13, !isPathAbsolute)).length ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path13 += "/"), _DRIVE_LETTER_RE2.test(path13) && (path13 += "/"), isUNCPath ? isPathAbsolute ? `//${path13}` : `//./${path13}` : isPathAbsolute && !isAbsolute3(path13) ? `/${path13}` : path13);
|
|
1492
|
-
},
|
|
1492
|
+
}, join13 = function(...arguments_) {
|
|
1493
1493
|
if (0 === arguments_.length) return ".";
|
|
1494
1494
|
let joined;
|
|
1495
1495
|
for (const argument of arguments_) argument && argument.length > 0 && (void 0 === joined ? joined = argument : joined += `/${argument}`);
|
|
@@ -4102,13 +4102,13 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
4102
4102
|
} catch (_a4) {
|
|
4103
4103
|
return false;
|
|
4104
4104
|
}
|
|
4105
|
-
}(_filename) && (_filename =
|
|
4105
|
+
}(_filename) && (_filename = join13(_filename, "index.js")), true === opts.cache && (opts.cache = function() {
|
|
4106
4106
|
let _tmpDir = (0, external_os_namespaceObject.tmpdir)();
|
|
4107
4107
|
if (process.env.TMPDIR && _tmpDir === process.cwd() && !process.env.JITI_RESPECT_TMPDIR_ENV) {
|
|
4108
4108
|
const _env = process.env.TMPDIR;
|
|
4109
4109
|
delete process.env.TMPDIR, _tmpDir = (0, external_os_namespaceObject.tmpdir)(), process.env.TMPDIR = _env;
|
|
4110
4110
|
}
|
|
4111
|
-
return
|
|
4111
|
+
return join13(_tmpDir, "node-jiti");
|
|
4112
4112
|
}()), opts.cache) try {
|
|
4113
4113
|
if ((0, external_fs_.mkdirSync)(opts.cache, { recursive: true }), !function(filename) {
|
|
4114
4114
|
try {
|
|
@@ -4133,7 +4133,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
4133
4133
|
for (const [alias2, to3] of Object.entries(aliases2)) {
|
|
4134
4134
|
if (!_path.startsWith(alias2)) continue;
|
|
4135
4135
|
const _alias = hasTrailingSlash2(alias2) ? alias2.slice(0, -1) : alias2;
|
|
4136
|
-
if (hasTrailingSlash2(_path[_alias.length])) return
|
|
4136
|
+
if (hasTrailingSlash2(_path[_alias.length])) return join13(to3, _path.slice(alias2.length));
|
|
4137
4137
|
}
|
|
4138
4138
|
return _path;
|
|
4139
4139
|
}(id, alias)), opts.esmResolve) {
|
|
@@ -4161,7 +4161,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
4161
4161
|
function transform3(topts) {
|
|
4162
4162
|
let code = function(filename, source2, get3) {
|
|
4163
4163
|
if (!opts.cache || !filename) return get3();
|
|
4164
|
-
const sourceHash = ` /* v${opts.cacheVersion}-${md5(source2, 16)} */`, filebase = basename2(pathe_ff20891b_dirname(filename)) + "-" + basename2(filename), cacheFile =
|
|
4164
|
+
const sourceHash = ` /* v${opts.cacheVersion}-${md5(source2, 16)} */`, filebase = basename2(pathe_ff20891b_dirname(filename)) + "-" + basename2(filename), cacheFile = join13(opts.cache, filebase + "." + md5(filename) + ".js");
|
|
4165
4165
|
if ((0, external_fs_.existsSync)(cacheFile)) {
|
|
4166
4166
|
const cacheSource = (0, external_fs_.readFileSync)(cacheFile, "utf8");
|
|
4167
4167
|
if (cacheSource.endsWith(sourceHash)) return debug2("[cache hit]", filename, "~>", cacheFile), cacheSource;
|
|
@@ -4218,9 +4218,9 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
4218
4218
|
var _a4;
|
|
4219
4219
|
const id = evalOptions.id || (evalOptions.filename ? basename2(evalOptions.filename) : `_jitiEval.${evalOptions.ext || ".js"}`), filename = evalOptions.filename || _resolve3(id), ext = evalOptions.ext || extname5(filename), cache4 = evalOptions.cache || parentCache || {}, isTypescript = ".ts" === ext || ".mts" === ext || ".cts" === ext, isNativeModule = ".mjs" === ext || ".js" === ext && "module" === (null === (_a4 = function(path13) {
|
|
4220
4220
|
for (; path13 && "." !== path13 && "/" !== path13; ) {
|
|
4221
|
-
path13 =
|
|
4221
|
+
path13 = join13(path13, "..");
|
|
4222
4222
|
try {
|
|
4223
|
-
const pkg = (0, external_fs_.readFileSync)(
|
|
4223
|
+
const pkg = (0, external_fs_.readFileSync)(join13(path13, "package.json"), "utf8");
|
|
4224
4224
|
try {
|
|
4225
4225
|
return JSON.parse(pkg);
|
|
4226
4226
|
} catch (_a5) {
|
|
@@ -37763,7 +37763,7 @@ var require_path_reservations = __commonJS({
|
|
|
37763
37763
|
var assert7 = __require("assert");
|
|
37764
37764
|
var normalize2 = require_normalize_unicode();
|
|
37765
37765
|
var stripSlashes = require_strip_trailing_slashes();
|
|
37766
|
-
var { join:
|
|
37766
|
+
var { join: join13 } = __require("path");
|
|
37767
37767
|
var platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
37768
37768
|
var isWindows = platform === "win32";
|
|
37769
37769
|
module.exports = () => {
|
|
@@ -37772,7 +37772,7 @@ var require_path_reservations = __commonJS({
|
|
|
37772
37772
|
const getDirs = (path13) => {
|
|
37773
37773
|
const dirs = path13.split("/").slice(0, -1).reduce((set3, path14) => {
|
|
37774
37774
|
if (set3.length) {
|
|
37775
|
-
path14 =
|
|
37775
|
+
path14 = join13(set3[set3.length - 1], path14);
|
|
37776
37776
|
}
|
|
37777
37777
|
set3.push(path14 || "/");
|
|
37778
37778
|
return set3;
|
|
@@ -37840,7 +37840,7 @@ var require_path_reservations = __commonJS({
|
|
|
37840
37840
|
};
|
|
37841
37841
|
const reserve = (paths, fn7) => {
|
|
37842
37842
|
paths = isWindows ? ["win32 parallelization disabled"] : paths.map((p4) => {
|
|
37843
|
-
return stripSlashes(
|
|
37843
|
+
return stripSlashes(join13(normalize2(p4))).toLowerCase();
|
|
37844
37844
|
});
|
|
37845
37845
|
const dirs = new Set(
|
|
37846
37846
|
paths.map((path13) => getDirs(path13)).reduce((a3, b11) => a3.concat(b11))
|
|
@@ -58655,16 +58655,16 @@ var require_tsconfig_loader = __commonJS({
|
|
|
58655
58655
|
return walkForTsConfig(parentDirectory, readdirSync4);
|
|
58656
58656
|
}
|
|
58657
58657
|
exports.walkForTsConfig = walkForTsConfig;
|
|
58658
|
-
function loadTsconfig(configFilePath,
|
|
58659
|
-
if (
|
|
58660
|
-
|
|
58658
|
+
function loadTsconfig(configFilePath, existsSync10, readFileSync8) {
|
|
58659
|
+
if (existsSync10 === void 0) {
|
|
58660
|
+
existsSync10 = fs11.existsSync;
|
|
58661
58661
|
}
|
|
58662
58662
|
if (readFileSync8 === void 0) {
|
|
58663
58663
|
readFileSync8 = function(filename) {
|
|
58664
58664
|
return fs11.readFileSync(filename, "utf8");
|
|
58665
58665
|
};
|
|
58666
58666
|
}
|
|
58667
|
-
if (!
|
|
58667
|
+
if (!existsSync10(configFilePath)) {
|
|
58668
58668
|
return void 0;
|
|
58669
58669
|
}
|
|
58670
58670
|
var configString = readFileSync8(configFilePath);
|
|
@@ -58680,27 +58680,27 @@ var require_tsconfig_loader = __commonJS({
|
|
|
58680
58680
|
var base = void 0;
|
|
58681
58681
|
if (Array.isArray(extendedConfig)) {
|
|
58682
58682
|
base = extendedConfig.reduce(function(currBase, extendedConfigElement) {
|
|
58683
|
-
return mergeTsconfigs(currBase, loadTsconfigFromExtends(configFilePath, extendedConfigElement,
|
|
58683
|
+
return mergeTsconfigs(currBase, loadTsconfigFromExtends(configFilePath, extendedConfigElement, existsSync10, readFileSync8));
|
|
58684
58684
|
}, {});
|
|
58685
58685
|
} else {
|
|
58686
|
-
base = loadTsconfigFromExtends(configFilePath, extendedConfig,
|
|
58686
|
+
base = loadTsconfigFromExtends(configFilePath, extendedConfig, existsSync10, readFileSync8);
|
|
58687
58687
|
}
|
|
58688
58688
|
return mergeTsconfigs(base, config2);
|
|
58689
58689
|
}
|
|
58690
58690
|
return config2;
|
|
58691
58691
|
}
|
|
58692
58692
|
exports.loadTsconfig = loadTsconfig;
|
|
58693
|
-
function loadTsconfigFromExtends(configFilePath, extendedConfigValue,
|
|
58693
|
+
function loadTsconfigFromExtends(configFilePath, extendedConfigValue, existsSync10, readFileSync8) {
|
|
58694
58694
|
var _a4;
|
|
58695
58695
|
if (typeof extendedConfigValue === "string" && extendedConfigValue.indexOf(".json") === -1) {
|
|
58696
58696
|
extendedConfigValue += ".json";
|
|
58697
58697
|
}
|
|
58698
58698
|
var currentDir = path13.dirname(configFilePath);
|
|
58699
58699
|
var extendedConfigPath = path13.join(currentDir, extendedConfigValue);
|
|
58700
|
-
if (extendedConfigValue.indexOf("/") !== -1 && extendedConfigValue.indexOf(".") !== -1 && !
|
|
58700
|
+
if (extendedConfigValue.indexOf("/") !== -1 && extendedConfigValue.indexOf(".") !== -1 && !existsSync10(extendedConfigPath)) {
|
|
58701
58701
|
extendedConfigPath = path13.join(currentDir, "node_modules", extendedConfigValue);
|
|
58702
58702
|
}
|
|
58703
|
-
var config2 = loadTsconfig(extendedConfigPath,
|
|
58703
|
+
var config2 = loadTsconfig(extendedConfigPath, existsSync10, readFileSync8) || {};
|
|
58704
58704
|
if ((_a4 = config2.compilerOptions) === null || _a4 === void 0 ? void 0 : _a4.baseUrl) {
|
|
58705
58705
|
var extendsDir = path13.dirname(extendedConfigValue);
|
|
58706
58706
|
config2.compilerOptions.baseUrl = path13.join(extendsDir, config2.compilerOptions.baseUrl);
|
|
@@ -77948,7 +77948,7 @@ var require_buffer_list = __commonJS({
|
|
|
77948
77948
|
}
|
|
77949
77949
|
}, {
|
|
77950
77950
|
key: "join",
|
|
77951
|
-
value: function
|
|
77951
|
+
value: function join13(s3) {
|
|
77952
77952
|
if (this.length === 0) return "";
|
|
77953
77953
|
var p4 = this.head;
|
|
77954
77954
|
var ret = "" + p4.data;
|
|
@@ -110764,7 +110764,7 @@ function lineSuffix(contents) {
|
|
|
110764
110764
|
assertDoc(contents);
|
|
110765
110765
|
return { type: DOC_TYPE_LINE_SUFFIX, contents };
|
|
110766
110766
|
}
|
|
110767
|
-
function
|
|
110767
|
+
function join9(separator, docs) {
|
|
110768
110768
|
assertDoc(separator);
|
|
110769
110769
|
assertDocArray(docs);
|
|
110770
110770
|
const parts = [];
|
|
@@ -111124,7 +111124,7 @@ function cleanDoc(doc) {
|
|
|
111124
111124
|
return mapDoc(doc, (currentDoc) => cleanDocFn(currentDoc));
|
|
111125
111125
|
}
|
|
111126
111126
|
function replaceEndOfLine(doc, replacement = literalline) {
|
|
111127
|
-
return mapDoc(doc, (currentDoc) => typeof currentDoc === "string" ?
|
|
111127
|
+
return mapDoc(doc, (currentDoc) => typeof currentDoc === "string" ? join9(replacement, currentDoc.split("\n")) : currentDoc);
|
|
111128
111128
|
}
|
|
111129
111129
|
function canBreakFn(doc) {
|
|
111130
111130
|
if (doc.type === DOC_TYPE_LINE) {
|
|
@@ -111821,7 +111821,7 @@ var init_doc = __esm({
|
|
|
111821
111821
|
MODE_FLAT = Symbol("MODE_FLAT");
|
|
111822
111822
|
CURSOR_PLACEHOLDER = Symbol("cursor");
|
|
111823
111823
|
builders = {
|
|
111824
|
-
join:
|
|
111824
|
+
join: join9,
|
|
111825
111825
|
line,
|
|
111826
111826
|
softline,
|
|
111827
111827
|
hardline,
|
|
@@ -231713,7 +231713,7 @@ ${formatLogMessage(config2)}`, {
|
|
|
231713
231713
|
// packages/git-tools/bin/git.ts
|
|
231714
231714
|
var import_fs_extra = __toESM(require_lib3(), 1);
|
|
231715
231715
|
var import_tsconfig_paths = __toESM(require_lib5(), 1);
|
|
231716
|
-
import { join as
|
|
231716
|
+
import { join as join12 } from "node:path";
|
|
231717
231717
|
|
|
231718
231718
|
// node_modules/.pnpm/commander@12.1.0/node_modules/commander/esm.mjs
|
|
231719
231719
|
var import_index = __toESM(require_commander(), 1);
|
|
@@ -232245,16 +232245,18 @@ var runCommit = async (commitConfig = "@storm-software/git-tools/commit/config.j
|
|
|
232245
232245
|
};
|
|
232246
232246
|
|
|
232247
232247
|
// packages/git-tools/src/commitlint/run-lint.ts
|
|
232248
|
+
import { existsSync as existsSync7 } from "fs";
|
|
232248
232249
|
import { readFile as readFile4 } from "fs/promises";
|
|
232249
232250
|
import childProcess2 from "node:child_process";
|
|
232251
|
+
import { join as join5 } from "node:path";
|
|
232250
232252
|
var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
|
|
232251
232253
|
var runCommitLint = async (commitMessageArg) => {
|
|
232252
232254
|
const config2 = await loadStormConfig();
|
|
232253
232255
|
let commitMessage;
|
|
232254
232256
|
if (commitMessageArg && commitMessageArg !== COMMIT_EDITMSG_PATH) {
|
|
232255
232257
|
commitMessage = commitMessageArg;
|
|
232256
|
-
} else if (
|
|
232257
|
-
commitMessage = await readCommitMessageFile();
|
|
232258
|
+
} else if (existsSync7(join5(config2.workspaceRoot, COMMIT_EDITMSG_PATH))) {
|
|
232259
|
+
commitMessage = await readCommitMessageFile(config2.workspaceRoot);
|
|
232258
232260
|
}
|
|
232259
232261
|
if (!commitMessage) {
|
|
232260
232262
|
let gitLogCmd = "git log -1 --no-merges";
|
|
@@ -232312,26 +232314,26 @@ possible scopes: ${allowedScopes} (if unsure use "core")`;
|
|
|
232312
232314
|
throw new Error(errorMessage);
|
|
232313
232315
|
}
|
|
232314
232316
|
};
|
|
232315
|
-
var readCommitMessageFile = async () => {
|
|
232316
|
-
return (await readFile4(COMMIT_EDITMSG_PATH, "utf8"))?.trim();
|
|
232317
|
+
var readCommitMessageFile = async (workspaceRoot3) => {
|
|
232318
|
+
return (await readFile4(join5(workspaceRoot3, COMMIT_EDITMSG_PATH), "utf8"))?.trim();
|
|
232317
232319
|
};
|
|
232318
232320
|
|
|
232319
232321
|
// packages/git-tools/src/readme/index.ts
|
|
232320
232322
|
import {
|
|
232321
|
-
existsSync as
|
|
232323
|
+
existsSync as existsSync9,
|
|
232322
232324
|
readFileSync as readFileSync6,
|
|
232323
232325
|
readdirSync as readdirSync3,
|
|
232324
232326
|
rmSync,
|
|
232325
232327
|
writeFileSync as writeFileSync3
|
|
232326
232328
|
} from "node:fs";
|
|
232327
|
-
import { join as
|
|
232329
|
+
import { join as join10 } from "node:path";
|
|
232328
232330
|
import {
|
|
232329
232331
|
createProjectGraphAsync as createProjectGraphAsync2,
|
|
232330
232332
|
readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2
|
|
232331
232333
|
} from "nx/src/project-graph/project-graph.js";
|
|
232332
232334
|
|
|
232333
232335
|
// packages/git-tools/src/utilities/file-utils.ts
|
|
232334
|
-
import Path, { dirname as dirname3, isAbsolute as isAbsolute2, join as
|
|
232336
|
+
import Path, { dirname as dirname3, isAbsolute as isAbsolute2, join as join6 } from "node:path";
|
|
232335
232337
|
function findFileName(filePath) {
|
|
232336
232338
|
return filePath?.split(filePath?.includes(Path.sep) ? Path.sep : filePath?.includes("/") ? "/" : "\\")?.pop() ?? "";
|
|
232337
232339
|
}
|
|
@@ -232341,7 +232343,7 @@ function findFilePath(filePath) {
|
|
|
232341
232343
|
|
|
232342
232344
|
// packages/git-tools/src/readme/doctoc.ts
|
|
232343
232345
|
import { readFileSync as readFileSync4, readdirSync as readdirSync2, statSync as statSync3, writeFileSync as writeFileSync2 } from "node:fs";
|
|
232344
|
-
import { extname as extname3, join as
|
|
232346
|
+
import { extname as extname3, join as join7 } from "node:path";
|
|
232345
232347
|
|
|
232346
232348
|
// node_modules/.pnpm/underscore@1.13.6/node_modules/underscore/modules/index.js
|
|
232347
232349
|
var modules_exports = {};
|
|
@@ -236109,7 +236111,7 @@ function separateFilesAndDirs(fileInfos) {
|
|
|
236109
236111
|
}
|
|
236110
236112
|
function findMarkdownFiles(currentPath) {
|
|
236111
236113
|
function getFileInfo3(entry) {
|
|
236112
|
-
const target =
|
|
236114
|
+
const target = join7(currentPath, entry);
|
|
236113
236115
|
return {
|
|
236114
236116
|
name: entry,
|
|
236115
236117
|
path: target
|
|
@@ -236137,8 +236139,8 @@ function findMarkdownFiles(currentPath) {
|
|
|
236137
236139
|
}
|
|
236138
236140
|
|
|
236139
236141
|
// packages/git-tools/src/readme/nx-docs.ts
|
|
236140
|
-
import { existsSync as
|
|
236141
|
-
import { join as
|
|
236142
|
+
import { existsSync as existsSync8, readFileSync as readFileSync5 } from "node:fs";
|
|
236143
|
+
import { join as join8 } from "node:path";
|
|
236142
236144
|
var getExecutorMarkdown = (_packageName, executorsJsonFile, executorsJson) => {
|
|
236143
236145
|
if (!executorsJson?.executors) {
|
|
236144
236146
|
return "";
|
|
@@ -236152,8 +236154,8 @@ var getExecutorMarkdown = (_packageName, executorsJsonFile, executorsJson) => {
|
|
|
236152
236154
|
let description = "";
|
|
236153
236155
|
let required = [];
|
|
236154
236156
|
if (executor.schema) {
|
|
236155
|
-
const schemaJsonPath =
|
|
236156
|
-
if (
|
|
236157
|
+
const schemaJsonPath = join8(findFilePath(executorsJsonFile), executor.schema);
|
|
236158
|
+
if (existsSync8(schemaJsonPath)) {
|
|
236157
236159
|
const schemaJson = JSON.parse(readFileSync5(schemaJsonPath, "utf8") ?? "{}");
|
|
236158
236160
|
if (schemaJson.title) {
|
|
236159
236161
|
title = `## ${schemaJson.title}
|
|
@@ -236245,8 +236247,8 @@ var getGeneratorMarkdown = (packageName, generatorsJsonFile, generatorsJson) =>
|
|
|
236245
236247
|
let example = "";
|
|
236246
236248
|
const required = [];
|
|
236247
236249
|
if (generator.schema) {
|
|
236248
|
-
const schemaJsonPath =
|
|
236249
|
-
if (
|
|
236250
|
+
const schemaJsonPath = join8(findFilePath(generatorsJsonFile), generator.schema);
|
|
236251
|
+
if (existsSync8(schemaJsonPath)) {
|
|
236250
236252
|
const schemaJson = JSON.parse(readFileSync5(schemaJsonPath, "utf8") ?? "{}");
|
|
236251
236253
|
if (schemaJson.title) {
|
|
236252
236254
|
title = `## ${schemaJson.title}
|
|
@@ -236448,11 +236450,11 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
|
|
|
236448
236450
|
});
|
|
236449
236451
|
const projectConfigs = readProjectsConfigurationFromProjectGraph2(projectGraph);
|
|
236450
236452
|
const project = projectConfigs.projects[projectName];
|
|
236451
|
-
const inputFile =
|
|
236452
|
-
if (
|
|
236453
|
+
const inputFile = join10(project?.root ?? "./", "README.md");
|
|
236454
|
+
if (existsSync9(inputFile)) {
|
|
236453
236455
|
console.info(`Formatting ${projectName}'s README file at "${inputFile}"`);
|
|
236454
|
-
const outputFilePath = output2 ? output2.includes("README.md") ? output2 :
|
|
236455
|
-
if (clean &&
|
|
236456
|
+
const outputFilePath = output2 ? output2.includes("README.md") ? output2 : join10(findFilePath(output2), "README.md") : inputFile;
|
|
236457
|
+
if (clean && existsSync9(outputFilePath)) {
|
|
236456
236458
|
if (outputFilePath === inputFile) {
|
|
236457
236459
|
console.warn(
|
|
236458
236460
|
"Skipping cleaning since output directory + file name is the same as input directory + file name."
|
|
@@ -236467,7 +236469,7 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
|
|
|
236467
236469
|
let newContent = readdirSync3(templates).reduce(
|
|
236468
236470
|
(ret, fileName) => {
|
|
236469
236471
|
console.info(`Using template "${fileName}" to format file...`);
|
|
236470
|
-
const templateFilePath =
|
|
236472
|
+
const templateFilePath = join10(templates, fileName);
|
|
236471
236473
|
const templateContent = readFileSync6(templateFilePath, "utf8");
|
|
236472
236474
|
const section = findFileName(templateFilePath).replace(templates, "").replace("README.", "").replace(".md", "");
|
|
236473
236475
|
return formatReadMeFromSectionName(section, templateContent, ret);
|
|
@@ -236475,8 +236477,8 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
|
|
|
236475
236477
|
readFileSync6(inputFile, "utf8")
|
|
236476
236478
|
);
|
|
236477
236479
|
let packageName = projectName;
|
|
236478
|
-
const packageJsonPath =
|
|
236479
|
-
if (
|
|
236480
|
+
const packageJsonPath = join10(findFilePath(inputFile), "package.json");
|
|
236481
|
+
if (existsSync9(packageJsonPath)) {
|
|
236480
236482
|
const packageJson = JSON.parse(
|
|
236481
236483
|
readFileSync6(packageJsonPath, "utf8") ?? "{}"
|
|
236482
236484
|
);
|
|
@@ -236492,8 +236494,8 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
|
|
|
236492
236494
|
}
|
|
236493
236495
|
}
|
|
236494
236496
|
if (newContent.includes("<!-- START executors -->")) {
|
|
236495
|
-
const executorsJsonPath =
|
|
236496
|
-
if (
|
|
236497
|
+
const executorsJsonPath = join10(findFilePath(inputFile), "executors.json");
|
|
236498
|
+
if (existsSync9(executorsJsonPath)) {
|
|
236497
236499
|
const executorsJson = JSON.parse(
|
|
236498
236500
|
readFileSync6(executorsJsonPath, "utf8") ?? "{}"
|
|
236499
236501
|
);
|
|
@@ -236508,11 +236510,11 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
|
|
|
236508
236510
|
}
|
|
236509
236511
|
}
|
|
236510
236512
|
if (newContent.includes("<!-- START generators -->")) {
|
|
236511
|
-
const generatorsJsonPath =
|
|
236513
|
+
const generatorsJsonPath = join10(
|
|
236512
236514
|
findFilePath(inputFile),
|
|
236513
236515
|
"generators.json"
|
|
236514
236516
|
);
|
|
236515
|
-
if (
|
|
236517
|
+
if (existsSync9(generatorsJsonPath)) {
|
|
236516
236518
|
const generatorsJson = JSON.parse(
|
|
236517
236519
|
readFileSync6(generatorsJsonPath, "utf8") ?? "{}"
|
|
236518
236520
|
);
|
|
@@ -237037,7 +237039,7 @@ function resolveGeneratorData({
|
|
|
237037
237039
|
}
|
|
237038
237040
|
|
|
237039
237041
|
// packages/git-tools/src/release/release-config.ts
|
|
237040
|
-
import { join as
|
|
237042
|
+
import { join as join11, relative as relative3 } from "node:path";
|
|
237041
237043
|
import { joinPathFragments as joinPathFragments2 } from "nx/src/devkit-exports.js";
|
|
237042
237044
|
import { readJsonFile } from "nx/src/utils/fileutils.js";
|
|
237043
237045
|
import { findMatchingProjects } from "nx/src/utils/find-matching-projects.js";
|
|
@@ -237294,12 +237296,12 @@ async function getDefaultProjects(projectGraph, projectFileMap) {
|
|
|
237294
237296
|
}
|
|
237295
237297
|
function isProjectPublic(project, projectGraph, projectFileMap) {
|
|
237296
237298
|
const projectNode = projectGraph.nodes[project];
|
|
237297
|
-
const packageJsonPath =
|
|
237299
|
+
const packageJsonPath = join11(projectNode.data.root, "package.json");
|
|
237298
237300
|
if (!projectFileMap[project]?.find((f7) => f7.file === packageJsonPath)) {
|
|
237299
237301
|
return false;
|
|
237300
237302
|
}
|
|
237301
237303
|
try {
|
|
237302
|
-
const fullPackageJsonPath =
|
|
237304
|
+
const fullPackageJsonPath = join11(workspaceRoot2, packageJsonPath);
|
|
237303
237305
|
const packageJson = readJsonFile(fullPackageJsonPath);
|
|
237304
237306
|
return !(packageJson.private === true);
|
|
237305
237307
|
} catch (e3) {
|
|
@@ -237847,7 +237849,7 @@ void (async () => {
|
|
|
237847
237849
|
try {
|
|
237848
237850
|
handleProcess(config2);
|
|
237849
237851
|
const compilerOptions = (0, import_fs_extra.readJsonSync)(
|
|
237850
|
-
|
|
237852
|
+
join12(config2.workspaceRoot ?? "./", "tsconfig.base.json")
|
|
237851
237853
|
).compilerOptions;
|
|
237852
237854
|
(0, import_tsconfig_paths.register)(compilerOptions);
|
|
237853
237855
|
const program2 = createProgram2(config2);
|
package/package.json
CHANGED
package/src/cli/index.js
CHANGED
|
@@ -1488,7 +1488,7 @@ var require_jiti = __commonJS({
|
|
|
1488
1488
|
if (0 === path13.length) return ".";
|
|
1489
1489
|
const isUNCPath = (path13 = normalizeWindowsPath2(path13)).match(_UNC_REGEX2), isPathAbsolute = isAbsolute3(path13), trailingSeparator = "/" === path13[path13.length - 1];
|
|
1490
1490
|
return 0 === (path13 = normalizeString2(path13, !isPathAbsolute)).length ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path13 += "/"), _DRIVE_LETTER_RE2.test(path13) && (path13 += "/"), isUNCPath ? isPathAbsolute ? `//${path13}` : `//./${path13}` : isPathAbsolute && !isAbsolute3(path13) ? `/${path13}` : path13);
|
|
1491
|
-
},
|
|
1491
|
+
}, join12 = function(...arguments_) {
|
|
1492
1492
|
if (0 === arguments_.length) return ".";
|
|
1493
1493
|
let joined;
|
|
1494
1494
|
for (const argument of arguments_) argument && argument.length > 0 && (void 0 === joined ? joined = argument : joined += `/${argument}`);
|
|
@@ -4101,13 +4101,13 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
4101
4101
|
} catch (_a4) {
|
|
4102
4102
|
return false;
|
|
4103
4103
|
}
|
|
4104
|
-
}(_filename) && (_filename =
|
|
4104
|
+
}(_filename) && (_filename = join12(_filename, "index.js")), true === opts.cache && (opts.cache = function() {
|
|
4105
4105
|
let _tmpDir = (0, external_os_namespaceObject.tmpdir)();
|
|
4106
4106
|
if (process.env.TMPDIR && _tmpDir === process.cwd() && !process.env.JITI_RESPECT_TMPDIR_ENV) {
|
|
4107
4107
|
const _env = process.env.TMPDIR;
|
|
4108
4108
|
delete process.env.TMPDIR, _tmpDir = (0, external_os_namespaceObject.tmpdir)(), process.env.TMPDIR = _env;
|
|
4109
4109
|
}
|
|
4110
|
-
return
|
|
4110
|
+
return join12(_tmpDir, "node-jiti");
|
|
4111
4111
|
}()), opts.cache) try {
|
|
4112
4112
|
if ((0, external_fs_.mkdirSync)(opts.cache, { recursive: true }), !function(filename) {
|
|
4113
4113
|
try {
|
|
@@ -4132,7 +4132,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
4132
4132
|
for (const [alias2, to3] of Object.entries(aliases2)) {
|
|
4133
4133
|
if (!_path.startsWith(alias2)) continue;
|
|
4134
4134
|
const _alias = hasTrailingSlash2(alias2) ? alias2.slice(0, -1) : alias2;
|
|
4135
|
-
if (hasTrailingSlash2(_path[_alias.length])) return
|
|
4135
|
+
if (hasTrailingSlash2(_path[_alias.length])) return join12(to3, _path.slice(alias2.length));
|
|
4136
4136
|
}
|
|
4137
4137
|
return _path;
|
|
4138
4138
|
}(id, alias)), opts.esmResolve) {
|
|
@@ -4160,7 +4160,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
4160
4160
|
function transform3(topts) {
|
|
4161
4161
|
let code = function(filename, source2, get3) {
|
|
4162
4162
|
if (!opts.cache || !filename) return get3();
|
|
4163
|
-
const sourceHash = ` /* v${opts.cacheVersion}-${md5(source2, 16)} */`, filebase = basename2(pathe_ff20891b_dirname(filename)) + "-" + basename2(filename), cacheFile =
|
|
4163
|
+
const sourceHash = ` /* v${opts.cacheVersion}-${md5(source2, 16)} */`, filebase = basename2(pathe_ff20891b_dirname(filename)) + "-" + basename2(filename), cacheFile = join12(opts.cache, filebase + "." + md5(filename) + ".js");
|
|
4164
4164
|
if ((0, external_fs_.existsSync)(cacheFile)) {
|
|
4165
4165
|
const cacheSource = (0, external_fs_.readFileSync)(cacheFile, "utf8");
|
|
4166
4166
|
if (cacheSource.endsWith(sourceHash)) return debug2("[cache hit]", filename, "~>", cacheFile), cacheSource;
|
|
@@ -4217,9 +4217,9 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
4217
4217
|
var _a4;
|
|
4218
4218
|
const id = evalOptions.id || (evalOptions.filename ? basename2(evalOptions.filename) : `_jitiEval.${evalOptions.ext || ".js"}`), filename = evalOptions.filename || _resolve3(id), ext = evalOptions.ext || extname5(filename), cache4 = evalOptions.cache || parentCache || {}, isTypescript = ".ts" === ext || ".mts" === ext || ".cts" === ext, isNativeModule = ".mjs" === ext || ".js" === ext && "module" === (null === (_a4 = function(path13) {
|
|
4219
4219
|
for (; path13 && "." !== path13 && "/" !== path13; ) {
|
|
4220
|
-
path13 =
|
|
4220
|
+
path13 = join12(path13, "..");
|
|
4221
4221
|
try {
|
|
4222
|
-
const pkg = (0, external_fs_.readFileSync)(
|
|
4222
|
+
const pkg = (0, external_fs_.readFileSync)(join12(path13, "package.json"), "utf8");
|
|
4223
4223
|
try {
|
|
4224
4224
|
return JSON.parse(pkg);
|
|
4225
4225
|
} catch (_a5) {
|
|
@@ -37762,7 +37762,7 @@ var require_path_reservations = __commonJS({
|
|
|
37762
37762
|
var assert7 = __require("assert");
|
|
37763
37763
|
var normalize2 = require_normalize_unicode();
|
|
37764
37764
|
var stripSlashes = require_strip_trailing_slashes();
|
|
37765
|
-
var { join:
|
|
37765
|
+
var { join: join12 } = __require("path");
|
|
37766
37766
|
var platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
37767
37767
|
var isWindows = platform === "win32";
|
|
37768
37768
|
module.exports = () => {
|
|
@@ -37771,7 +37771,7 @@ var require_path_reservations = __commonJS({
|
|
|
37771
37771
|
const getDirs = (path13) => {
|
|
37772
37772
|
const dirs = path13.split("/").slice(0, -1).reduce((set3, path14) => {
|
|
37773
37773
|
if (set3.length) {
|
|
37774
|
-
path14 =
|
|
37774
|
+
path14 = join12(set3[set3.length - 1], path14);
|
|
37775
37775
|
}
|
|
37776
37776
|
set3.push(path14 || "/");
|
|
37777
37777
|
return set3;
|
|
@@ -37839,7 +37839,7 @@ var require_path_reservations = __commonJS({
|
|
|
37839
37839
|
};
|
|
37840
37840
|
const reserve = (paths, fn7) => {
|
|
37841
37841
|
paths = isWindows ? ["win32 parallelization disabled"] : paths.map((p4) => {
|
|
37842
|
-
return stripSlashes(
|
|
37842
|
+
return stripSlashes(join12(normalize2(p4))).toLowerCase();
|
|
37843
37843
|
});
|
|
37844
37844
|
const dirs = new Set(
|
|
37845
37845
|
paths.map((path13) => getDirs(path13)).reduce((a3, b11) => a3.concat(b11))
|
|
@@ -73786,7 +73786,7 @@ var require_buffer_list = __commonJS({
|
|
|
73786
73786
|
}
|
|
73787
73787
|
}, {
|
|
73788
73788
|
key: "join",
|
|
73789
|
-
value: function
|
|
73789
|
+
value: function join12(s3) {
|
|
73790
73790
|
if (this.length === 0) return "";
|
|
73791
73791
|
var p4 = this.head;
|
|
73792
73792
|
var ret = "" + p4.data;
|
|
@@ -106602,7 +106602,7 @@ function lineSuffix(contents) {
|
|
|
106602
106602
|
assertDoc(contents);
|
|
106603
106603
|
return { type: DOC_TYPE_LINE_SUFFIX, contents };
|
|
106604
106604
|
}
|
|
106605
|
-
function
|
|
106605
|
+
function join9(separator, docs) {
|
|
106606
106606
|
assertDoc(separator);
|
|
106607
106607
|
assertDocArray(docs);
|
|
106608
106608
|
const parts = [];
|
|
@@ -106962,7 +106962,7 @@ function cleanDoc(doc) {
|
|
|
106962
106962
|
return mapDoc(doc, (currentDoc) => cleanDocFn(currentDoc));
|
|
106963
106963
|
}
|
|
106964
106964
|
function replaceEndOfLine(doc, replacement = literalline) {
|
|
106965
|
-
return mapDoc(doc, (currentDoc) => typeof currentDoc === "string" ?
|
|
106965
|
+
return mapDoc(doc, (currentDoc) => typeof currentDoc === "string" ? join9(replacement, currentDoc.split("\n")) : currentDoc);
|
|
106966
106966
|
}
|
|
106967
106967
|
function canBreakFn(doc) {
|
|
106968
106968
|
if (doc.type === DOC_TYPE_LINE) {
|
|
@@ -107659,7 +107659,7 @@ var init_doc = __esm({
|
|
|
107659
107659
|
MODE_FLAT = Symbol("MODE_FLAT");
|
|
107660
107660
|
CURSOR_PLACEHOLDER = Symbol("cursor");
|
|
107661
107661
|
builders = {
|
|
107662
|
-
join:
|
|
107662
|
+
join: join9,
|
|
107663
107663
|
line,
|
|
107664
107664
|
softline,
|
|
107665
107665
|
hardline,
|
|
@@ -228035,16 +228035,18 @@ var runCommit = async (commitConfig = "@storm-software/git-tools/commit/config.j
|
|
|
228035
228035
|
};
|
|
228036
228036
|
|
|
228037
228037
|
// packages/git-tools/src/commitlint/run-lint.ts
|
|
228038
|
+
import { existsSync as existsSync7 } from "fs";
|
|
228038
228039
|
import { readFile as readFile4 } from "fs/promises";
|
|
228039
228040
|
import childProcess2 from "node:child_process";
|
|
228041
|
+
import { join as join5 } from "node:path";
|
|
228040
228042
|
var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
|
|
228041
228043
|
var runCommitLint = async (commitMessageArg) => {
|
|
228042
228044
|
const config2 = await loadStormConfig();
|
|
228043
228045
|
let commitMessage;
|
|
228044
228046
|
if (commitMessageArg && commitMessageArg !== COMMIT_EDITMSG_PATH) {
|
|
228045
228047
|
commitMessage = commitMessageArg;
|
|
228046
|
-
} else if (
|
|
228047
|
-
commitMessage = await readCommitMessageFile();
|
|
228048
|
+
} else if (existsSync7(join5(config2.workspaceRoot, COMMIT_EDITMSG_PATH))) {
|
|
228049
|
+
commitMessage = await readCommitMessageFile(config2.workspaceRoot);
|
|
228048
228050
|
}
|
|
228049
228051
|
if (!commitMessage) {
|
|
228050
228052
|
let gitLogCmd = "git log -1 --no-merges";
|
|
@@ -228102,26 +228104,26 @@ possible scopes: ${allowedScopes} (if unsure use "core")`;
|
|
|
228102
228104
|
throw new Error(errorMessage);
|
|
228103
228105
|
}
|
|
228104
228106
|
};
|
|
228105
|
-
var readCommitMessageFile = async () => {
|
|
228106
|
-
return (await readFile4(COMMIT_EDITMSG_PATH, "utf8"))?.trim();
|
|
228107
|
+
var readCommitMessageFile = async (workspaceRoot3) => {
|
|
228108
|
+
return (await readFile4(join5(workspaceRoot3, COMMIT_EDITMSG_PATH), "utf8"))?.trim();
|
|
228107
228109
|
};
|
|
228108
228110
|
|
|
228109
228111
|
// packages/git-tools/src/readme/index.ts
|
|
228110
228112
|
import {
|
|
228111
|
-
existsSync as
|
|
228113
|
+
existsSync as existsSync9,
|
|
228112
228114
|
readFileSync as readFileSync6,
|
|
228113
228115
|
readdirSync as readdirSync3,
|
|
228114
228116
|
rmSync,
|
|
228115
228117
|
writeFileSync as writeFileSync3
|
|
228116
228118
|
} from "node:fs";
|
|
228117
|
-
import { join as
|
|
228119
|
+
import { join as join10 } from "node:path";
|
|
228118
228120
|
import {
|
|
228119
228121
|
createProjectGraphAsync as createProjectGraphAsync2,
|
|
228120
228122
|
readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2
|
|
228121
228123
|
} from "nx/src/project-graph/project-graph.js";
|
|
228122
228124
|
|
|
228123
228125
|
// packages/git-tools/src/utilities/file-utils.ts
|
|
228124
|
-
import Path, { dirname as dirname3, isAbsolute as isAbsolute2, join as
|
|
228126
|
+
import Path, { dirname as dirname3, isAbsolute as isAbsolute2, join as join6 } from "node:path";
|
|
228125
228127
|
function findFileName(filePath) {
|
|
228126
228128
|
return filePath?.split(filePath?.includes(Path.sep) ? Path.sep : filePath?.includes("/") ? "/" : "\\")?.pop() ?? "";
|
|
228127
228129
|
}
|
|
@@ -228131,7 +228133,7 @@ function findFilePath(filePath) {
|
|
|
228131
228133
|
|
|
228132
228134
|
// packages/git-tools/src/readme/doctoc.ts
|
|
228133
228135
|
import { readFileSync as readFileSync4, readdirSync as readdirSync2, statSync as statSync3, writeFileSync as writeFileSync2 } from "node:fs";
|
|
228134
|
-
import { extname as extname3, join as
|
|
228136
|
+
import { extname as extname3, join as join7 } from "node:path";
|
|
228135
228137
|
|
|
228136
228138
|
// node_modules/.pnpm/underscore@1.13.6/node_modules/underscore/modules/index.js
|
|
228137
228139
|
var modules_exports = {};
|
|
@@ -231899,7 +231901,7 @@ function separateFilesAndDirs(fileInfos) {
|
|
|
231899
231901
|
}
|
|
231900
231902
|
function findMarkdownFiles(currentPath) {
|
|
231901
231903
|
function getFileInfo3(entry) {
|
|
231902
|
-
const target =
|
|
231904
|
+
const target = join7(currentPath, entry);
|
|
231903
231905
|
return {
|
|
231904
231906
|
name: entry,
|
|
231905
231907
|
path: target
|
|
@@ -231927,8 +231929,8 @@ function findMarkdownFiles(currentPath) {
|
|
|
231927
231929
|
}
|
|
231928
231930
|
|
|
231929
231931
|
// packages/git-tools/src/readme/nx-docs.ts
|
|
231930
|
-
import { existsSync as
|
|
231931
|
-
import { join as
|
|
231932
|
+
import { existsSync as existsSync8, readFileSync as readFileSync5 } from "node:fs";
|
|
231933
|
+
import { join as join8 } from "node:path";
|
|
231932
231934
|
var getExecutorMarkdown = (_packageName, executorsJsonFile, executorsJson) => {
|
|
231933
231935
|
if (!executorsJson?.executors) {
|
|
231934
231936
|
return "";
|
|
@@ -231942,8 +231944,8 @@ var getExecutorMarkdown = (_packageName, executorsJsonFile, executorsJson) => {
|
|
|
231942
231944
|
let description = "";
|
|
231943
231945
|
let required = [];
|
|
231944
231946
|
if (executor.schema) {
|
|
231945
|
-
const schemaJsonPath =
|
|
231946
|
-
if (
|
|
231947
|
+
const schemaJsonPath = join8(findFilePath(executorsJsonFile), executor.schema);
|
|
231948
|
+
if (existsSync8(schemaJsonPath)) {
|
|
231947
231949
|
const schemaJson = JSON.parse(readFileSync5(schemaJsonPath, "utf8") ?? "{}");
|
|
231948
231950
|
if (schemaJson.title) {
|
|
231949
231951
|
title = `## ${schemaJson.title}
|
|
@@ -232035,8 +232037,8 @@ var getGeneratorMarkdown = (packageName, generatorsJsonFile, generatorsJson) =>
|
|
|
232035
232037
|
let example = "";
|
|
232036
232038
|
const required = [];
|
|
232037
232039
|
if (generator.schema) {
|
|
232038
|
-
const schemaJsonPath =
|
|
232039
|
-
if (
|
|
232040
|
+
const schemaJsonPath = join8(findFilePath(generatorsJsonFile), generator.schema);
|
|
232041
|
+
if (existsSync8(schemaJsonPath)) {
|
|
232040
232042
|
const schemaJson = JSON.parse(readFileSync5(schemaJsonPath, "utf8") ?? "{}");
|
|
232041
232043
|
if (schemaJson.title) {
|
|
232042
232044
|
title = `## ${schemaJson.title}
|
|
@@ -232238,11 +232240,11 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
|
|
|
232238
232240
|
});
|
|
232239
232241
|
const projectConfigs = readProjectsConfigurationFromProjectGraph2(projectGraph);
|
|
232240
232242
|
const project = projectConfigs.projects[projectName];
|
|
232241
|
-
const inputFile =
|
|
232242
|
-
if (
|
|
232243
|
+
const inputFile = join10(project?.root ?? "./", "README.md");
|
|
232244
|
+
if (existsSync9(inputFile)) {
|
|
232243
232245
|
console.info(`Formatting ${projectName}'s README file at "${inputFile}"`);
|
|
232244
|
-
const outputFilePath = output2 ? output2.includes("README.md") ? output2 :
|
|
232245
|
-
if (clean &&
|
|
232246
|
+
const outputFilePath = output2 ? output2.includes("README.md") ? output2 : join10(findFilePath(output2), "README.md") : inputFile;
|
|
232247
|
+
if (clean && existsSync9(outputFilePath)) {
|
|
232246
232248
|
if (outputFilePath === inputFile) {
|
|
232247
232249
|
console.warn(
|
|
232248
232250
|
"Skipping cleaning since output directory + file name is the same as input directory + file name."
|
|
@@ -232257,7 +232259,7 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
|
|
|
232257
232259
|
let newContent = readdirSync3(templates).reduce(
|
|
232258
232260
|
(ret, fileName) => {
|
|
232259
232261
|
console.info(`Using template "${fileName}" to format file...`);
|
|
232260
|
-
const templateFilePath =
|
|
232262
|
+
const templateFilePath = join10(templates, fileName);
|
|
232261
232263
|
const templateContent = readFileSync6(templateFilePath, "utf8");
|
|
232262
232264
|
const section = findFileName(templateFilePath).replace(templates, "").replace("README.", "").replace(".md", "");
|
|
232263
232265
|
return formatReadMeFromSectionName(section, templateContent, ret);
|
|
@@ -232265,8 +232267,8 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
|
|
|
232265
232267
|
readFileSync6(inputFile, "utf8")
|
|
232266
232268
|
);
|
|
232267
232269
|
let packageName = projectName;
|
|
232268
|
-
const packageJsonPath =
|
|
232269
|
-
if (
|
|
232270
|
+
const packageJsonPath = join10(findFilePath(inputFile), "package.json");
|
|
232271
|
+
if (existsSync9(packageJsonPath)) {
|
|
232270
232272
|
const packageJson = JSON.parse(
|
|
232271
232273
|
readFileSync6(packageJsonPath, "utf8") ?? "{}"
|
|
232272
232274
|
);
|
|
@@ -232282,8 +232284,8 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
|
|
|
232282
232284
|
}
|
|
232283
232285
|
}
|
|
232284
232286
|
if (newContent.includes("<!-- START executors -->")) {
|
|
232285
|
-
const executorsJsonPath =
|
|
232286
|
-
if (
|
|
232287
|
+
const executorsJsonPath = join10(findFilePath(inputFile), "executors.json");
|
|
232288
|
+
if (existsSync9(executorsJsonPath)) {
|
|
232287
232289
|
const executorsJson = JSON.parse(
|
|
232288
232290
|
readFileSync6(executorsJsonPath, "utf8") ?? "{}"
|
|
232289
232291
|
);
|
|
@@ -232298,11 +232300,11 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
|
|
|
232298
232300
|
}
|
|
232299
232301
|
}
|
|
232300
232302
|
if (newContent.includes("<!-- START generators -->")) {
|
|
232301
|
-
const generatorsJsonPath =
|
|
232303
|
+
const generatorsJsonPath = join10(
|
|
232302
232304
|
findFilePath(inputFile),
|
|
232303
232305
|
"generators.json"
|
|
232304
232306
|
);
|
|
232305
|
-
if (
|
|
232307
|
+
if (existsSync9(generatorsJsonPath)) {
|
|
232306
232308
|
const generatorsJson = JSON.parse(
|
|
232307
232309
|
readFileSync6(generatorsJsonPath, "utf8") ?? "{}"
|
|
232308
232310
|
);
|
|
@@ -232827,7 +232829,7 @@ function resolveGeneratorData({
|
|
|
232827
232829
|
}
|
|
232828
232830
|
|
|
232829
232831
|
// packages/git-tools/src/release/release-config.ts
|
|
232830
|
-
import { join as
|
|
232832
|
+
import { join as join11, relative as relative3 } from "node:path";
|
|
232831
232833
|
import { joinPathFragments as joinPathFragments2 } from "nx/src/devkit-exports.js";
|
|
232832
232834
|
import { readJsonFile } from "nx/src/utils/fileutils.js";
|
|
232833
232835
|
import { findMatchingProjects } from "nx/src/utils/find-matching-projects.js";
|
|
@@ -233084,12 +233086,12 @@ async function getDefaultProjects(projectGraph, projectFileMap) {
|
|
|
233084
233086
|
}
|
|
233085
233087
|
function isProjectPublic(project, projectGraph, projectFileMap) {
|
|
233086
233088
|
const projectNode = projectGraph.nodes[project];
|
|
233087
|
-
const packageJsonPath =
|
|
233089
|
+
const packageJsonPath = join11(projectNode.data.root, "package.json");
|
|
233088
233090
|
if (!projectFileMap[project]?.find((f7) => f7.file === packageJsonPath)) {
|
|
233089
233091
|
return false;
|
|
233090
233092
|
}
|
|
233091
233093
|
try {
|
|
233092
|
-
const fullPackageJsonPath =
|
|
233094
|
+
const fullPackageJsonPath = join11(workspaceRoot2, packageJsonPath);
|
|
233093
233095
|
const packageJson = readJsonFile(fullPackageJsonPath);
|
|
233094
233096
|
return !(packageJson.private === true);
|
|
233095
233097
|
} catch (e3) {
|
package/src/index.js
CHANGED
|
@@ -1488,7 +1488,7 @@ var require_jiti = __commonJS({
|
|
|
1488
1488
|
if (0 === path13.length) return ".";
|
|
1489
1489
|
const isUNCPath = (path13 = normalizeWindowsPath2(path13)).match(_UNC_REGEX2), isPathAbsolute = isAbsolute3(path13), trailingSeparator = "/" === path13[path13.length - 1];
|
|
1490
1490
|
return 0 === (path13 = normalizeString2(path13, !isPathAbsolute)).length ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path13 += "/"), _DRIVE_LETTER_RE2.test(path13) && (path13 += "/"), isUNCPath ? isPathAbsolute ? `//${path13}` : `//./${path13}` : isPathAbsolute && !isAbsolute3(path13) ? `/${path13}` : path13);
|
|
1491
|
-
},
|
|
1491
|
+
}, join12 = function(...arguments_) {
|
|
1492
1492
|
if (0 === arguments_.length) return ".";
|
|
1493
1493
|
let joined;
|
|
1494
1494
|
for (const argument of arguments_) argument && argument.length > 0 && (void 0 === joined ? joined = argument : joined += `/${argument}`);
|
|
@@ -4101,13 +4101,13 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
4101
4101
|
} catch (_a4) {
|
|
4102
4102
|
return false;
|
|
4103
4103
|
}
|
|
4104
|
-
}(_filename) && (_filename =
|
|
4104
|
+
}(_filename) && (_filename = join12(_filename, "index.js")), true === opts.cache && (opts.cache = function() {
|
|
4105
4105
|
let _tmpDir = (0, external_os_namespaceObject.tmpdir)();
|
|
4106
4106
|
if (process.env.TMPDIR && _tmpDir === process.cwd() && !process.env.JITI_RESPECT_TMPDIR_ENV) {
|
|
4107
4107
|
const _env = process.env.TMPDIR;
|
|
4108
4108
|
delete process.env.TMPDIR, _tmpDir = (0, external_os_namespaceObject.tmpdir)(), process.env.TMPDIR = _env;
|
|
4109
4109
|
}
|
|
4110
|
-
return
|
|
4110
|
+
return join12(_tmpDir, "node-jiti");
|
|
4111
4111
|
}()), opts.cache) try {
|
|
4112
4112
|
if ((0, external_fs_.mkdirSync)(opts.cache, { recursive: true }), !function(filename) {
|
|
4113
4113
|
try {
|
|
@@ -4132,7 +4132,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
4132
4132
|
for (const [alias2, to3] of Object.entries(aliases2)) {
|
|
4133
4133
|
if (!_path.startsWith(alias2)) continue;
|
|
4134
4134
|
const _alias = hasTrailingSlash2(alias2) ? alias2.slice(0, -1) : alias2;
|
|
4135
|
-
if (hasTrailingSlash2(_path[_alias.length])) return
|
|
4135
|
+
if (hasTrailingSlash2(_path[_alias.length])) return join12(to3, _path.slice(alias2.length));
|
|
4136
4136
|
}
|
|
4137
4137
|
return _path;
|
|
4138
4138
|
}(id, alias)), opts.esmResolve) {
|
|
@@ -4160,7 +4160,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
4160
4160
|
function transform3(topts) {
|
|
4161
4161
|
let code = function(filename, source2, get3) {
|
|
4162
4162
|
if (!opts.cache || !filename) return get3();
|
|
4163
|
-
const sourceHash = ` /* v${opts.cacheVersion}-${md5(source2, 16)} */`, filebase = basename2(pathe_ff20891b_dirname(filename)) + "-" + basename2(filename), cacheFile =
|
|
4163
|
+
const sourceHash = ` /* v${opts.cacheVersion}-${md5(source2, 16)} */`, filebase = basename2(pathe_ff20891b_dirname(filename)) + "-" + basename2(filename), cacheFile = join12(opts.cache, filebase + "." + md5(filename) + ".js");
|
|
4164
4164
|
if ((0, external_fs_.existsSync)(cacheFile)) {
|
|
4165
4165
|
const cacheSource = (0, external_fs_.readFileSync)(cacheFile, "utf8");
|
|
4166
4166
|
if (cacheSource.endsWith(sourceHash)) return debug2("[cache hit]", filename, "~>", cacheFile), cacheSource;
|
|
@@ -4217,9 +4217,9 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
4217
4217
|
var _a4;
|
|
4218
4218
|
const id = evalOptions.id || (evalOptions.filename ? basename2(evalOptions.filename) : `_jitiEval.${evalOptions.ext || ".js"}`), filename = evalOptions.filename || _resolve3(id), ext = evalOptions.ext || extname5(filename), cache4 = evalOptions.cache || parentCache || {}, isTypescript = ".ts" === ext || ".mts" === ext || ".cts" === ext, isNativeModule = ".mjs" === ext || ".js" === ext && "module" === (null === (_a4 = function(path13) {
|
|
4219
4219
|
for (; path13 && "." !== path13 && "/" !== path13; ) {
|
|
4220
|
-
path13 =
|
|
4220
|
+
path13 = join12(path13, "..");
|
|
4221
4221
|
try {
|
|
4222
|
-
const pkg = (0, external_fs_.readFileSync)(
|
|
4222
|
+
const pkg = (0, external_fs_.readFileSync)(join12(path13, "package.json"), "utf8");
|
|
4223
4223
|
try {
|
|
4224
4224
|
return JSON.parse(pkg);
|
|
4225
4225
|
} catch (_a5) {
|
|
@@ -37762,7 +37762,7 @@ var require_path_reservations = __commonJS({
|
|
|
37762
37762
|
var assert7 = __require("assert");
|
|
37763
37763
|
var normalize2 = require_normalize_unicode();
|
|
37764
37764
|
var stripSlashes = require_strip_trailing_slashes();
|
|
37765
|
-
var { join:
|
|
37765
|
+
var { join: join12 } = __require("path");
|
|
37766
37766
|
var platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
37767
37767
|
var isWindows = platform === "win32";
|
|
37768
37768
|
module.exports = () => {
|
|
@@ -37771,7 +37771,7 @@ var require_path_reservations = __commonJS({
|
|
|
37771
37771
|
const getDirs = (path13) => {
|
|
37772
37772
|
const dirs = path13.split("/").slice(0, -1).reduce((set3, path14) => {
|
|
37773
37773
|
if (set3.length) {
|
|
37774
|
-
path14 =
|
|
37774
|
+
path14 = join12(set3[set3.length - 1], path14);
|
|
37775
37775
|
}
|
|
37776
37776
|
set3.push(path14 || "/");
|
|
37777
37777
|
return set3;
|
|
@@ -37839,7 +37839,7 @@ var require_path_reservations = __commonJS({
|
|
|
37839
37839
|
};
|
|
37840
37840
|
const reserve = (paths, fn7) => {
|
|
37841
37841
|
paths = isWindows ? ["win32 parallelization disabled"] : paths.map((p4) => {
|
|
37842
|
-
return stripSlashes(
|
|
37842
|
+
return stripSlashes(join12(normalize2(p4))).toLowerCase();
|
|
37843
37843
|
});
|
|
37844
37844
|
const dirs = new Set(
|
|
37845
37845
|
paths.map((path13) => getDirs(path13)).reduce((a3, b11) => a3.concat(b11))
|
|
@@ -73786,7 +73786,7 @@ var require_buffer_list = __commonJS({
|
|
|
73786
73786
|
}
|
|
73787
73787
|
}, {
|
|
73788
73788
|
key: "join",
|
|
73789
|
-
value: function
|
|
73789
|
+
value: function join12(s3) {
|
|
73790
73790
|
if (this.length === 0) return "";
|
|
73791
73791
|
var p4 = this.head;
|
|
73792
73792
|
var ret = "" + p4.data;
|
|
@@ -106602,7 +106602,7 @@ function lineSuffix(contents) {
|
|
|
106602
106602
|
assertDoc(contents);
|
|
106603
106603
|
return { type: DOC_TYPE_LINE_SUFFIX, contents };
|
|
106604
106604
|
}
|
|
106605
|
-
function
|
|
106605
|
+
function join9(separator, docs) {
|
|
106606
106606
|
assertDoc(separator);
|
|
106607
106607
|
assertDocArray(docs);
|
|
106608
106608
|
const parts = [];
|
|
@@ -106962,7 +106962,7 @@ function cleanDoc(doc) {
|
|
|
106962
106962
|
return mapDoc(doc, (currentDoc) => cleanDocFn(currentDoc));
|
|
106963
106963
|
}
|
|
106964
106964
|
function replaceEndOfLine(doc, replacement = literalline) {
|
|
106965
|
-
return mapDoc(doc, (currentDoc) => typeof currentDoc === "string" ?
|
|
106965
|
+
return mapDoc(doc, (currentDoc) => typeof currentDoc === "string" ? join9(replacement, currentDoc.split("\n")) : currentDoc);
|
|
106966
106966
|
}
|
|
106967
106967
|
function canBreakFn(doc) {
|
|
106968
106968
|
if (doc.type === DOC_TYPE_LINE) {
|
|
@@ -107659,7 +107659,7 @@ var init_doc = __esm({
|
|
|
107659
107659
|
MODE_FLAT = Symbol("MODE_FLAT");
|
|
107660
107660
|
CURSOR_PLACEHOLDER = Symbol("cursor");
|
|
107661
107661
|
builders = {
|
|
107662
|
-
join:
|
|
107662
|
+
join: join9,
|
|
107663
107663
|
line,
|
|
107664
107664
|
softline,
|
|
107665
107665
|
hardline,
|
|
@@ -228137,16 +228137,18 @@ var runCommit = async (commitConfig = "@storm-software/git-tools/commit/config.j
|
|
|
228137
228137
|
};
|
|
228138
228138
|
|
|
228139
228139
|
// packages/git-tools/src/commitlint/run-lint.ts
|
|
228140
|
+
import { existsSync as existsSync7 } from "fs";
|
|
228140
228141
|
import { readFile as readFile4 } from "fs/promises";
|
|
228141
228142
|
import childProcess2 from "node:child_process";
|
|
228143
|
+
import { join as join5 } from "node:path";
|
|
228142
228144
|
var COMMIT_EDITMSG_PATH = ".git/COMMIT_EDITMSG";
|
|
228143
228145
|
var runCommitLint = async (commitMessageArg) => {
|
|
228144
228146
|
const config2 = await loadStormConfig();
|
|
228145
228147
|
let commitMessage;
|
|
228146
228148
|
if (commitMessageArg && commitMessageArg !== COMMIT_EDITMSG_PATH) {
|
|
228147
228149
|
commitMessage = commitMessageArg;
|
|
228148
|
-
} else if (
|
|
228149
|
-
commitMessage = await readCommitMessageFile();
|
|
228150
|
+
} else if (existsSync7(join5(config2.workspaceRoot, COMMIT_EDITMSG_PATH))) {
|
|
228151
|
+
commitMessage = await readCommitMessageFile(config2.workspaceRoot);
|
|
228150
228152
|
}
|
|
228151
228153
|
if (!commitMessage) {
|
|
228152
228154
|
let gitLogCmd = "git log -1 --no-merges";
|
|
@@ -228204,26 +228206,26 @@ possible scopes: ${allowedScopes} (if unsure use "core")`;
|
|
|
228204
228206
|
throw new Error(errorMessage);
|
|
228205
228207
|
}
|
|
228206
228208
|
};
|
|
228207
|
-
var readCommitMessageFile = async () => {
|
|
228208
|
-
return (await readFile4(COMMIT_EDITMSG_PATH, "utf8"))?.trim();
|
|
228209
|
+
var readCommitMessageFile = async (workspaceRoot3) => {
|
|
228210
|
+
return (await readFile4(join5(workspaceRoot3, COMMIT_EDITMSG_PATH), "utf8"))?.trim();
|
|
228209
228211
|
};
|
|
228210
228212
|
|
|
228211
228213
|
// packages/git-tools/src/readme/index.ts
|
|
228212
228214
|
import {
|
|
228213
|
-
existsSync as
|
|
228215
|
+
existsSync as existsSync9,
|
|
228214
228216
|
readFileSync as readFileSync6,
|
|
228215
228217
|
readdirSync as readdirSync3,
|
|
228216
228218
|
rmSync,
|
|
228217
228219
|
writeFileSync as writeFileSync3
|
|
228218
228220
|
} from "node:fs";
|
|
228219
|
-
import { join as
|
|
228221
|
+
import { join as join10 } from "node:path";
|
|
228220
228222
|
import {
|
|
228221
228223
|
createProjectGraphAsync as createProjectGraphAsync2,
|
|
228222
228224
|
readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2
|
|
228223
228225
|
} from "nx/src/project-graph/project-graph.js";
|
|
228224
228226
|
|
|
228225
228227
|
// packages/git-tools/src/utilities/file-utils.ts
|
|
228226
|
-
import Path, { dirname as dirname3, isAbsolute as isAbsolute2, join as
|
|
228228
|
+
import Path, { dirname as dirname3, isAbsolute as isAbsolute2, join as join6 } from "node:path";
|
|
228227
228229
|
function findFileName(filePath) {
|
|
228228
228230
|
return filePath?.split(filePath?.includes(Path.sep) ? Path.sep : filePath?.includes("/") ? "/" : "\\")?.pop() ?? "";
|
|
228229
228231
|
}
|
|
@@ -228235,7 +228237,7 @@ function resolvePath2(filePath, basePath) {
|
|
|
228235
228237
|
return filePath;
|
|
228236
228238
|
}
|
|
228237
228239
|
if (basePath) {
|
|
228238
|
-
return
|
|
228240
|
+
return join6(dirname3(basePath), filePath);
|
|
228239
228241
|
}
|
|
228240
228242
|
return null;
|
|
228241
228243
|
}
|
|
@@ -228246,7 +228248,7 @@ function renameFile(filePath, newFileName) {
|
|
|
228246
228248
|
|
|
228247
228249
|
// packages/git-tools/src/readme/doctoc.ts
|
|
228248
228250
|
import { readFileSync as readFileSync4, readdirSync as readdirSync2, statSync as statSync3, writeFileSync as writeFileSync2 } from "node:fs";
|
|
228249
|
-
import { extname as extname3, join as
|
|
228251
|
+
import { extname as extname3, join as join7 } from "node:path";
|
|
228250
228252
|
|
|
228251
228253
|
// node_modules/.pnpm/underscore@1.13.6/node_modules/underscore/modules/index.js
|
|
228252
228254
|
var modules_exports = {};
|
|
@@ -232014,7 +232016,7 @@ function separateFilesAndDirs(fileInfos) {
|
|
|
232014
232016
|
}
|
|
232015
232017
|
function findMarkdownFiles(currentPath) {
|
|
232016
232018
|
function getFileInfo3(entry) {
|
|
232017
|
-
const target =
|
|
232019
|
+
const target = join7(currentPath, entry);
|
|
232018
232020
|
return {
|
|
232019
232021
|
name: entry,
|
|
232020
232022
|
path: target
|
|
@@ -232042,8 +232044,8 @@ function findMarkdownFiles(currentPath) {
|
|
|
232042
232044
|
}
|
|
232043
232045
|
|
|
232044
232046
|
// packages/git-tools/src/readme/nx-docs.ts
|
|
232045
|
-
import { existsSync as
|
|
232046
|
-
import { join as
|
|
232047
|
+
import { existsSync as existsSync8, readFileSync as readFileSync5 } from "node:fs";
|
|
232048
|
+
import { join as join8 } from "node:path";
|
|
232047
232049
|
var getExecutorMarkdown = (_packageName, executorsJsonFile, executorsJson) => {
|
|
232048
232050
|
if (!executorsJson?.executors) {
|
|
232049
232051
|
return "";
|
|
@@ -232057,8 +232059,8 @@ var getExecutorMarkdown = (_packageName, executorsJsonFile, executorsJson) => {
|
|
|
232057
232059
|
let description = "";
|
|
232058
232060
|
let required = [];
|
|
232059
232061
|
if (executor.schema) {
|
|
232060
|
-
const schemaJsonPath =
|
|
232061
|
-
if (
|
|
232062
|
+
const schemaJsonPath = join8(findFilePath(executorsJsonFile), executor.schema);
|
|
232063
|
+
if (existsSync8(schemaJsonPath)) {
|
|
232062
232064
|
const schemaJson = JSON.parse(readFileSync5(schemaJsonPath, "utf8") ?? "{}");
|
|
232063
232065
|
if (schemaJson.title) {
|
|
232064
232066
|
title = `## ${schemaJson.title}
|
|
@@ -232150,8 +232152,8 @@ var getGeneratorMarkdown = (packageName, generatorsJsonFile, generatorsJson) =>
|
|
|
232150
232152
|
let example = "";
|
|
232151
232153
|
const required = [];
|
|
232152
232154
|
if (generator.schema) {
|
|
232153
|
-
const schemaJsonPath =
|
|
232154
|
-
if (
|
|
232155
|
+
const schemaJsonPath = join8(findFilePath(generatorsJsonFile), generator.schema);
|
|
232156
|
+
if (existsSync8(schemaJsonPath)) {
|
|
232155
232157
|
const schemaJson = JSON.parse(readFileSync5(schemaJsonPath, "utf8") ?? "{}");
|
|
232156
232158
|
if (schemaJson.title) {
|
|
232157
232159
|
title = `## ${schemaJson.title}
|
|
@@ -232353,11 +232355,11 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
|
|
|
232353
232355
|
});
|
|
232354
232356
|
const projectConfigs = readProjectsConfigurationFromProjectGraph2(projectGraph);
|
|
232355
232357
|
const project = projectConfigs.projects[projectName];
|
|
232356
|
-
const inputFile =
|
|
232357
|
-
if (
|
|
232358
|
+
const inputFile = join10(project?.root ?? "./", "README.md");
|
|
232359
|
+
if (existsSync9(inputFile)) {
|
|
232358
232360
|
console.info(`Formatting ${projectName}'s README file at "${inputFile}"`);
|
|
232359
|
-
const outputFilePath = output2 ? output2.includes("README.md") ? output2 :
|
|
232360
|
-
if (clean &&
|
|
232361
|
+
const outputFilePath = output2 ? output2.includes("README.md") ? output2 : join10(findFilePath(output2), "README.md") : inputFile;
|
|
232362
|
+
if (clean && existsSync9(outputFilePath)) {
|
|
232361
232363
|
if (outputFilePath === inputFile) {
|
|
232362
232364
|
console.warn(
|
|
232363
232365
|
"Skipping cleaning since output directory + file name is the same as input directory + file name."
|
|
@@ -232372,7 +232374,7 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
|
|
|
232372
232374
|
let newContent = readdirSync3(templates).reduce(
|
|
232373
232375
|
(ret, fileName) => {
|
|
232374
232376
|
console.info(`Using template "${fileName}" to format file...`);
|
|
232375
|
-
const templateFilePath =
|
|
232377
|
+
const templateFilePath = join10(templates, fileName);
|
|
232376
232378
|
const templateContent = readFileSync6(templateFilePath, "utf8");
|
|
232377
232379
|
const section = findFileName(templateFilePath).replace(templates, "").replace("README.", "").replace(".md", "");
|
|
232378
232380
|
return formatReadMeFromSectionName(section, templateContent, ret);
|
|
@@ -232380,8 +232382,8 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
|
|
|
232380
232382
|
readFileSync6(inputFile, "utf8")
|
|
232381
232383
|
);
|
|
232382
232384
|
let packageName = projectName;
|
|
232383
|
-
const packageJsonPath =
|
|
232384
|
-
if (
|
|
232385
|
+
const packageJsonPath = join10(findFilePath(inputFile), "package.json");
|
|
232386
|
+
if (existsSync9(packageJsonPath)) {
|
|
232385
232387
|
const packageJson = JSON.parse(
|
|
232386
232388
|
readFileSync6(packageJsonPath, "utf8") ?? "{}"
|
|
232387
232389
|
);
|
|
@@ -232397,8 +232399,8 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
|
|
|
232397
232399
|
}
|
|
232398
232400
|
}
|
|
232399
232401
|
if (newContent.includes("<!-- START executors -->")) {
|
|
232400
|
-
const executorsJsonPath =
|
|
232401
|
-
if (
|
|
232402
|
+
const executorsJsonPath = join10(findFilePath(inputFile), "executors.json");
|
|
232403
|
+
if (existsSync9(executorsJsonPath)) {
|
|
232402
232404
|
const executorsJson = JSON.parse(
|
|
232403
232405
|
readFileSync6(executorsJsonPath, "utf8") ?? "{}"
|
|
232404
232406
|
);
|
|
@@ -232413,11 +232415,11 @@ var runProjectReadme = async (projectName, { templates, output: output2, clean =
|
|
|
232413
232415
|
}
|
|
232414
232416
|
}
|
|
232415
232417
|
if (newContent.includes("<!-- START generators -->")) {
|
|
232416
|
-
const generatorsJsonPath =
|
|
232418
|
+
const generatorsJsonPath = join10(
|
|
232417
232419
|
findFilePath(inputFile),
|
|
232418
232420
|
"generators.json"
|
|
232419
232421
|
);
|
|
232420
|
-
if (
|
|
232422
|
+
if (existsSync9(generatorsJsonPath)) {
|
|
232421
232423
|
const generatorsJson = JSON.parse(
|
|
232422
232424
|
readFileSync6(generatorsJsonPath, "utf8") ?? "{}"
|
|
232423
232425
|
);
|
|
@@ -232942,7 +232944,7 @@ function resolveGeneratorData({
|
|
|
232942
232944
|
}
|
|
232943
232945
|
|
|
232944
232946
|
// packages/git-tools/src/release/release-config.ts
|
|
232945
|
-
import { join as
|
|
232947
|
+
import { join as join11, relative as relative3 } from "node:path";
|
|
232946
232948
|
import { joinPathFragments as joinPathFragments2 } from "nx/src/devkit-exports.js";
|
|
232947
232949
|
import { readJsonFile } from "nx/src/utils/fileutils.js";
|
|
232948
232950
|
import { findMatchingProjects } from "nx/src/utils/find-matching-projects.js";
|
|
@@ -233199,12 +233201,12 @@ async function getDefaultProjects(projectGraph, projectFileMap) {
|
|
|
233199
233201
|
}
|
|
233200
233202
|
function isProjectPublic(project, projectGraph, projectFileMap) {
|
|
233201
233203
|
const projectNode = projectGraph.nodes[project];
|
|
233202
|
-
const packageJsonPath =
|
|
233204
|
+
const packageJsonPath = join11(projectNode.data.root, "package.json");
|
|
233203
233205
|
if (!projectFileMap[project]?.find((f7) => f7.file === packageJsonPath)) {
|
|
233204
233206
|
return false;
|
|
233205
233207
|
}
|
|
233206
233208
|
try {
|
|
233207
|
-
const fullPackageJsonPath =
|
|
233209
|
+
const fullPackageJsonPath = join11(workspaceRoot2, packageJsonPath);
|
|
233208
233210
|
const packageJson = readJsonFile(fullPackageJsonPath);
|
|
233209
233211
|
return !(packageJson.private === true);
|
|
233210
233212
|
} catch (e3) {
|