@bemoje/monorepo 1.1.1 → 1.2.1

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 (127) hide show
  1. package/lib/MonoRepo.cjs +7370 -0
  2. package/lib/MonoRepo.d.cts +10 -0
  3. package/lib/MonoRepo.d.ts +10 -0
  4. package/lib/MonoRepo.js +7361 -0
  5. package/lib/code/AbstractCode.cjs +5568 -0
  6. package/lib/code/AbstractCode.d.cts +30 -0
  7. package/lib/code/AbstractCode.d.ts +30 -0
  8. package/lib/code/AbstractCode.js +5562 -0
  9. package/lib/code/CodeBlock.cjs +5614 -0
  10. package/lib/code/CodeBlock.d.cts +22 -0
  11. package/lib/code/CodeBlock.d.ts +22 -0
  12. package/lib/code/CodeBlock.js +5608 -0
  13. package/lib/code/TsCode.cjs +7370 -0
  14. package/lib/code/TsCode.d.cts +10 -0
  15. package/lib/code/TsCode.d.ts +10 -0
  16. package/lib/code/TsCode.js +7361 -0
  17. package/lib/code/imports/ImportKeywords.cjs +5652 -0
  18. package/lib/code/imports/ImportKeywords.d.cts +10 -0
  19. package/lib/code/imports/ImportKeywords.d.ts +10 -0
  20. package/lib/code/imports/ImportKeywords.js +5646 -0
  21. package/lib/code/imports/ImportSpecifiers.cjs +5708 -0
  22. package/lib/code/imports/ImportSpecifiers.d.cts +10 -0
  23. package/lib/code/imports/ImportSpecifiers.d.ts +10 -0
  24. package/lib/code/imports/ImportSpecifiers.js +5702 -0
  25. package/lib/code/imports/ImportStatement.cjs +7372 -0
  26. package/lib/code/imports/ImportStatement.d.cts +10 -0
  27. package/lib/code/imports/ImportStatement.d.ts +10 -0
  28. package/lib/code/imports/ImportStatement.js +7363 -0
  29. package/lib/code/imports/ModuleSpecifier.cjs +7372 -0
  30. package/lib/code/imports/ModuleSpecifier.d.cts +10 -0
  31. package/lib/code/imports/ModuleSpecifier.d.ts +10 -0
  32. package/lib/code/imports/ModuleSpecifier.js +7363 -0
  33. package/lib/common/AbstractBase.cjs +638 -0
  34. package/lib/common/AbstractBase.d.cts +3 -0
  35. package/lib/common/AbstractBase.d.ts +3 -0
  36. package/lib/common/AbstractBase.js +634 -0
  37. package/lib/file/File.cjs +5496 -0
  38. package/lib/file/File.d.cts +10 -0
  39. package/lib/file/File.d.ts +10 -0
  40. package/lib/file/File.js +5490 -0
  41. package/lib/file/TestFile.cjs +7368 -0
  42. package/lib/file/TestFile.d.cts +10 -0
  43. package/lib/file/TestFile.d.ts +10 -0
  44. package/lib/file/TestFile.js +7359 -0
  45. package/lib/file/TsFile.cjs +7368 -0
  46. package/lib/file/TsFile.d.cts +10 -0
  47. package/lib/file/TsFile.d.ts +10 -0
  48. package/lib/file/TsFile.js +7359 -0
  49. package/lib/index.cjs +7698 -0
  50. package/lib/index.d.cts +26 -0
  51. package/lib/index.d.ts +26 -0
  52. package/lib/index.js +7672 -0
  53. package/lib/methods/findWorkspacePackageName.cjs +86 -0
  54. package/lib/methods/findWorkspacePackageName.d.cts +6 -0
  55. package/lib/methods/findWorkspacePackageName.d.ts +6 -0
  56. package/lib/methods/findWorkspacePackageName.js +78 -0
  57. package/lib/methods/getAllImports.cjs +20 -0
  58. package/lib/methods/getAllImports.d.cts +17 -0
  59. package/lib/methods/getAllImports.d.ts +17 -0
  60. package/lib/methods/getAllImports.js +18 -0
  61. package/lib/methods/getAllWorkspacePackageJsonPaths.cjs +57 -0
  62. package/lib/methods/getAllWorkspacePackageJsonPaths.d.cts +6 -0
  63. package/lib/methods/getAllWorkspacePackageJsonPaths.d.ts +6 -0
  64. package/lib/methods/getAllWorkspacePackageJsonPaths.js +49 -0
  65. package/lib/methods/getAllWorkspacePackageJsons.cjs +66 -0
  66. package/lib/methods/getAllWorkspacePackageJsons.d.cts +6 -0
  67. package/lib/methods/getAllWorkspacePackageJsons.d.ts +6 -0
  68. package/lib/methods/getAllWorkspacePackageJsons.js +58 -0
  69. package/lib/methods/getAllWorkspacePackageNames.cjs +75 -0
  70. package/lib/methods/getAllWorkspacePackageNames.d.cts +6 -0
  71. package/lib/methods/getAllWorkspacePackageNames.d.ts +6 -0
  72. package/lib/methods/getAllWorkspacePackageNames.js +67 -0
  73. package/lib/methods/getAllWorkspacePaths.cjs +50 -0
  74. package/lib/methods/getAllWorkspacePaths.d.cts +6 -0
  75. package/lib/methods/getAllWorkspacePaths.d.ts +6 -0
  76. package/lib/methods/getAllWorkspacePaths.js +42 -0
  77. package/lib/methods/getImportsRecursively.cjs +7577 -0
  78. package/lib/methods/getImportsRecursively.d.cts +37 -0
  79. package/lib/methods/getImportsRecursively.d.ts +37 -0
  80. package/lib/methods/getImportsRecursively.js +7566 -0
  81. package/lib/methods/getRepoPackageJson.cjs +40 -0
  82. package/lib/methods/getRepoPackageJson.d.cts +6 -0
  83. package/lib/methods/getRepoPackageJson.d.ts +6 -0
  84. package/lib/methods/getRepoPackageJson.js +32 -0
  85. package/lib/methods/getRepoPackageJsonPath.cjs +34 -0
  86. package/lib/methods/getRepoPackageJsonPath.d.cts +6 -0
  87. package/lib/methods/getRepoPackageJsonPath.d.ts +6 -0
  88. package/lib/methods/getRepoPackageJsonPath.js +26 -0
  89. package/lib/repo/Workspace.cjs +7370 -0
  90. package/lib/repo/Workspace.d.cts +10 -0
  91. package/lib/repo/Workspace.d.ts +10 -0
  92. package/lib/repo/Workspace.js +7361 -0
  93. package/lib/util/SemanticExtnamePrefix.cjs +13 -0
  94. package/lib/util/SemanticExtnamePrefix.d.cts +14 -0
  95. package/lib/util/SemanticExtnamePrefix.d.ts +14 -0
  96. package/lib/util/SemanticExtnamePrefix.js +11 -0
  97. package/lib/util/SemanticExtnamePrefixDescriptions.cjs +13 -0
  98. package/lib/util/SemanticExtnamePrefixDescriptions.d.cts +15 -0
  99. package/lib/util/SemanticExtnamePrefixDescriptions.d.ts +15 -0
  100. package/lib/util/SemanticExtnamePrefixDescriptions.js +11 -0
  101. package/lib/util/SemanticExtnamePrefixes.cjs +18 -0
  102. package/lib/util/SemanticExtnamePrefixes.d.cts +97 -0
  103. package/lib/util/SemanticExtnamePrefixes.d.ts +97 -0
  104. package/lib/util/SemanticExtnamePrefixes.js +14 -0
  105. package/lib/util/getRepoRootDirpath.cjs +30 -0
  106. package/lib/util/getRepoRootDirpath.d.cts +6 -0
  107. package/lib/util/getRepoRootDirpath.d.ts +6 -0
  108. package/lib/util/getRepoRootDirpath.js +22 -0
  109. package/lib/util/getWorkspaceDirpaths.cjs +42 -0
  110. package/lib/util/getWorkspaceDirpaths.d.cts +6 -0
  111. package/lib/util/getWorkspaceDirpaths.d.ts +6 -0
  112. package/lib/util/getWorkspaceDirpaths.js +34 -0
  113. package/lib/util/hasExtnamePrefix.cjs +27 -0
  114. package/lib/util/hasExtnamePrefix.d.cts +38 -0
  115. package/lib/util/hasExtnamePrefix.d.ts +38 -0
  116. package/lib/util/hasExtnamePrefix.js +25 -0
  117. package/lib/util/resolveModuleImportPath.cjs +51 -0
  118. package/lib/util/resolveModuleImportPath.d.cts +8 -0
  119. package/lib/util/resolveModuleImportPath.d.ts +8 -0
  120. package/lib/util/resolveModuleImportPath.js +42 -0
  121. package/lib/util/semverVersionBump.cjs +30 -0
  122. package/lib/util/semverVersionBump.d.cts +22 -0
  123. package/lib/util/semverVersionBump.d.ts +22 -0
  124. package/lib/util/semverVersionBump.js +28 -0
  125. package/package.json +464 -31
  126. package/index.d.ts +0 -636
  127. package/index.mjs +0 -2321
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ var fs = require('fs-extra');
4
+ var onetime = require('onetime');
5
+ var path = require('upath');
6
+
7
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
+
9
+ var fs__default = /*#__PURE__*/_interopDefault(fs);
10
+ var onetime__default = /*#__PURE__*/_interopDefault(onetime);
11
+ var path__default = /*#__PURE__*/_interopDefault(path);
12
+
13
+ var __defProp = Object.defineProperty;
14
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
15
+ var getRepoRootDirpath = onetime__default.default(/* @__PURE__ */ __name(function getRepoRootDirpath2() {
16
+ return (/* @__PURE__ */ __name(function recurse(dirpath = process.cwd()) {
17
+ dirpath = path__default.default.normalizeSafe(dirpath);
18
+ const pkgpath = path__default.default.joinSafe(dirpath, "package.json");
19
+ if (fs__default.default.existsSync(pkgpath) && fs__default.default.readJsonSync(pkgpath)?.workspaces) {
20
+ return dirpath;
21
+ }
22
+ const parent = path__default.default.dirname(dirpath);
23
+ if (parent !== dirpath) {
24
+ return recurse(parent);
25
+ }
26
+ throw new Error(`Could not find repo root from process.cwd(): ${process.cwd()}`);
27
+ }, "recurse"))();
28
+ }, "getRepoRootDirpath"));
29
+ function getRepoPackageJsonPath() {
30
+ return path__default.default.joinSafe(getRepoRootDirpath(), "package.json");
31
+ }
32
+ __name(getRepoPackageJsonPath, "getRepoPackageJsonPath");
33
+
34
+ // src/methods/getRepoPackageJson.ts
35
+ async function getRepoPackageJson() {
36
+ return await fs__default.default.readJson(getRepoPackageJsonPath());
37
+ }
38
+ __name(getRepoPackageJson, "getRepoPackageJson");
39
+
40
+ exports.getRepoPackageJson = getRepoPackageJson;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Reads the repository's root package.json file.
3
+ */
4
+ declare function getRepoPackageJson(): Promise<any>;
5
+
6
+ export { getRepoPackageJson };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Reads the repository's root package.json file.
3
+ */
4
+ declare function getRepoPackageJson(): Promise<any>;
5
+
6
+ export { getRepoPackageJson };
@@ -0,0 +1,32 @@
1
+ import fs from 'fs-extra';
2
+ import onetime from 'onetime';
3
+ import path from 'upath';
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var getRepoRootDirpath = onetime(/* @__PURE__ */ __name(function getRepoRootDirpath2() {
8
+ return (/* @__PURE__ */ __name(function recurse(dirpath = process.cwd()) {
9
+ dirpath = path.normalizeSafe(dirpath);
10
+ const pkgpath = path.joinSafe(dirpath, "package.json");
11
+ if (fs.existsSync(pkgpath) && fs.readJsonSync(pkgpath)?.workspaces) {
12
+ return dirpath;
13
+ }
14
+ const parent = path.dirname(dirpath);
15
+ if (parent !== dirpath) {
16
+ return recurse(parent);
17
+ }
18
+ throw new Error(`Could not find repo root from process.cwd(): ${process.cwd()}`);
19
+ }, "recurse"))();
20
+ }, "getRepoRootDirpath"));
21
+ function getRepoPackageJsonPath() {
22
+ return path.joinSafe(getRepoRootDirpath(), "package.json");
23
+ }
24
+ __name(getRepoPackageJsonPath, "getRepoPackageJsonPath");
25
+
26
+ // src/methods/getRepoPackageJson.ts
27
+ async function getRepoPackageJson() {
28
+ return await fs.readJson(getRepoPackageJsonPath());
29
+ }
30
+ __name(getRepoPackageJson, "getRepoPackageJson");
31
+
32
+ export { getRepoPackageJson };
@@ -0,0 +1,34 @@
1
+ 'use strict';
2
+
3
+ var fs = require('fs-extra');
4
+ var onetime = require('onetime');
5
+ var path = require('upath');
6
+
7
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
+
9
+ var fs__default = /*#__PURE__*/_interopDefault(fs);
10
+ var onetime__default = /*#__PURE__*/_interopDefault(onetime);
11
+ var path__default = /*#__PURE__*/_interopDefault(path);
12
+
13
+ var __defProp = Object.defineProperty;
14
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
15
+ var getRepoRootDirpath = onetime__default.default(/* @__PURE__ */ __name(function getRepoRootDirpath2() {
16
+ return (/* @__PURE__ */ __name(function recurse(dirpath = process.cwd()) {
17
+ dirpath = path__default.default.normalizeSafe(dirpath);
18
+ const pkgpath = path__default.default.joinSafe(dirpath, "package.json");
19
+ if (fs__default.default.existsSync(pkgpath) && fs__default.default.readJsonSync(pkgpath)?.workspaces) {
20
+ return dirpath;
21
+ }
22
+ const parent = path__default.default.dirname(dirpath);
23
+ if (parent !== dirpath) {
24
+ return recurse(parent);
25
+ }
26
+ throw new Error(`Could not find repo root from process.cwd(): ${process.cwd()}`);
27
+ }, "recurse"))();
28
+ }, "getRepoRootDirpath"));
29
+ function getRepoPackageJsonPath() {
30
+ return path__default.default.joinSafe(getRepoRootDirpath(), "package.json");
31
+ }
32
+ __name(getRepoPackageJsonPath, "getRepoPackageJsonPath");
33
+
34
+ exports.getRepoPackageJsonPath = getRepoPackageJsonPath;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Gets the absolute path to the repository's package.json file.
3
+ */
4
+ declare function getRepoPackageJsonPath(): string;
5
+
6
+ export { getRepoPackageJsonPath };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Gets the absolute path to the repository's package.json file.
3
+ */
4
+ declare function getRepoPackageJsonPath(): string;
5
+
6
+ export { getRepoPackageJsonPath };
@@ -0,0 +1,26 @@
1
+ import fs from 'fs-extra';
2
+ import onetime from 'onetime';
3
+ import path from 'upath';
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var getRepoRootDirpath = onetime(/* @__PURE__ */ __name(function getRepoRootDirpath2() {
8
+ return (/* @__PURE__ */ __name(function recurse(dirpath = process.cwd()) {
9
+ dirpath = path.normalizeSafe(dirpath);
10
+ const pkgpath = path.joinSafe(dirpath, "package.json");
11
+ if (fs.existsSync(pkgpath) && fs.readJsonSync(pkgpath)?.workspaces) {
12
+ return dirpath;
13
+ }
14
+ const parent = path.dirname(dirpath);
15
+ if (parent !== dirpath) {
16
+ return recurse(parent);
17
+ }
18
+ throw new Error(`Could not find repo root from process.cwd(): ${process.cwd()}`);
19
+ }, "recurse"))();
20
+ }, "getRepoRootDirpath"));
21
+ function getRepoPackageJsonPath() {
22
+ return path.joinSafe(getRepoRootDirpath(), "package.json");
23
+ }
24
+ __name(getRepoPackageJsonPath, "getRepoPackageJsonPath");
25
+
26
+ export { getRepoPackageJsonPath };