jiek 2.2.7-alpha.3 → 2.2.7-alpha.5

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 (62) hide show
  1. package/.jiek-production-tag +0 -0
  2. package/dist/.internal/.chunks/{getWD.ZF0avqDB.cjs → filterSupport.4rM7f6jB.cjs} +38 -29
  3. package/dist/.internal/.chunks/{getWD.D6wq8Qc2.js → filterSupport.BXWpLBpT.js} +37 -28
  4. package/dist/.internal/.chunks/index.BHuJRlvZ.js +9059 -0
  5. package/dist/.internal/.chunks/index.Daihq2aI.cjs +9071 -0
  6. package/dist/.internal/.chunks/loadConfig.CFfzkm_p.js +110 -0
  7. package/dist/.internal/.chunks/loadConfig.OOKddvHF.cjs +117 -0
  8. package/dist/.internal/bin/common.cjs +757 -0
  9. package/dist/.internal/bin/common.d.cts +18 -0
  10. package/dist/.internal/bin/common.d.ts +18 -0
  11. package/dist/.internal/bin/common.js +750 -0
  12. package/dist/.internal/bridge.cjs +20 -2
  13. package/dist/.internal/bridge.js +19 -1
  14. package/dist/.internal/utils/filterSupport.cjs +1 -3
  15. package/dist/.internal/utils/filterSupport.js +1 -3
  16. package/dist/.internal/utils/loadConfig.cjs +8 -94
  17. package/dist/.internal/utils/loadConfig.js +7 -92
  18. package/dist/bin/build.cjs +2 -507
  19. package/dist/bin/index.cjs +5 -1
  20. package/package.json +2 -3
  21. package/src/bin/build.cts +2 -8
  22. package/src/bin/common.ts +3 -0
  23. package/src/bin/index.cts +2 -1
  24. package/src/commands/publish.ts +5 -0
  25. package/dist/.internal/.chunks/jiek_create-require.CWFWNQHj.cjs +0 -5
  26. package/dist/.internal/.chunks/jiek_create-require.CxSGbkTB.js +0 -5
  27. package/dist/.internal/commands/build/analyzer.cjs +0 -201
  28. package/dist/.internal/commands/build/analyzer.d.cts +0 -30
  29. package/dist/.internal/commands/build/analyzer.d.ts +0 -30
  30. package/dist/.internal/commands/build/analyzer.js +0 -195
  31. package/dist/.internal/commands/descriptions.cjs +0 -21
  32. package/dist/.internal/commands/descriptions.d.cts +0 -5
  33. package/dist/.internal/commands/descriptions.d.ts +0 -5
  34. package/dist/.internal/commands/descriptions.js +0 -17
  35. package/dist/.internal/commands/meta.cjs +0 -16
  36. package/dist/.internal/commands/meta.d.cts +0 -3
  37. package/dist/.internal/commands/meta.d.ts +0 -3
  38. package/dist/.internal/commands/meta.js +0 -15
  39. package/dist/.internal/commands/utils/optionParser.cjs +0 -8
  40. package/dist/.internal/commands/utils/optionParser.d.cts +0 -3
  41. package/dist/.internal/commands/utils/optionParser.d.ts +0 -3
  42. package/dist/.internal/commands/utils/optionParser.js +0 -6
  43. package/dist/.internal/server.cjs +0 -33
  44. package/dist/.internal/server.d.cts +0 -8
  45. package/dist/.internal/server.d.ts +0 -8
  46. package/dist/.internal/server.js +0 -27
  47. package/dist/.internal/utils/checkDependency.cjs +0 -39
  48. package/dist/.internal/utils/checkDependency.d.cts +0 -3
  49. package/dist/.internal/utils/checkDependency.d.ts +0 -3
  50. package/dist/.internal/utils/checkDependency.js +0 -34
  51. package/dist/.internal/utils/getRoot.cjs +0 -17
  52. package/dist/.internal/utils/getRoot.d.cts +0 -3
  53. package/dist/.internal/utils/getRoot.d.ts +0 -3
  54. package/dist/.internal/utils/getRoot.js +0 -11
  55. package/dist/.internal/utils/getWD.cjs +0 -15
  56. package/dist/.internal/utils/getWD.d.cts +0 -6
  57. package/dist/.internal/utils/getWD.d.ts +0 -6
  58. package/dist/.internal/utils/getWD.js +0 -10
  59. package/dist/.internal/utils/tsRegister.cjs +0 -25
  60. package/dist/.internal/utils/tsRegister.d.cts +0 -3
  61. package/dist/.internal/utils/tsRegister.d.ts +0 -3
  62. package/dist/.internal/utils/tsRegister.js +0 -26
File without changes
@@ -1,13 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var getWorkspaceDir = require('@jiek/utils/getWorkspaceDir');
4
- var jiek_createRequire = require('./jiek_create-require.CWFWNQHj.cjs');
5
3
  var fs = require('node:fs');
6
4
  var path = require('node:path');
7
5
  var process$1 = require('node:process');
8
6
  var commander = require('commander');
9
7
  var jsYaml = require('js-yaml');
10
- var getRoot = require('../utils/getRoot.cjs');
8
+ var getWorkspaceDir = require('@jiek/utils/getWorkspaceDir');
11
9
 
12
10
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
13
11
 
@@ -15,9 +13,43 @@ var fs__default = /*#__PURE__*/_interopDefault(fs);
15
13
  var path__default = /*#__PURE__*/_interopDefault(path);
16
14
  var process__default = /*#__PURE__*/_interopDefault(process$1);
17
15
 
16
+ var require$1 = require;
17
+
18
+ let root;
19
+ function getRoot() {
20
+ if (root) return root;
21
+ const rootOption = process.env.JIEK_ROOT;
22
+ root = rootOption ? path__default.default.isAbsolute(rootOption) ? rootOption : path__default.default.resolve(process.cwd(), rootOption) : void 0;
23
+ return root;
24
+ }
25
+
26
+ let wd;
27
+ let notWorkspace = false;
28
+ function getWD() {
29
+ if (wd) return { wd, notWorkspace };
30
+ const root = getRoot();
31
+ if (root !== void 0) {
32
+ const isWorkspace = getWorkspaceDir.isWorkspaceDir(root, exports.type);
33
+ notWorkspace = !isWorkspace;
34
+ wd = root;
35
+ return { wd, notWorkspace };
36
+ }
37
+ try {
38
+ wd = getWorkspaceDir.getWorkspaceDir(exports.type);
39
+ } catch (e) {
40
+ if ("message" in e && e.message === "workspace root not found") {
41
+ wd = root ?? process.cwd();
42
+ notWorkspace = true;
43
+ } else {
44
+ throw e;
45
+ }
46
+ }
47
+ return { wd, notWorkspace };
48
+ }
49
+
18
50
  exports.type = "";
19
51
  try {
20
- jiek_createRequire.require.resolve("@pnpm/filter-workspace-packages");
52
+ require$1.resolve("@pnpm/filter-workspace-packages");
21
53
  exports.type = "pnpm";
22
54
  } catch {
23
55
  }
@@ -26,7 +58,7 @@ async function filterPackagesGraph(filters) {
26
58
  }
27
59
  async function getSelectedProjectsGraph(filter = commander.program.getOptionValue("filter")) {
28
60
  const { wd, notWorkspace } = getWD();
29
- let root = getRoot.getRoot();
61
+ let root = getRoot();
30
62
  if (notWorkspace) {
31
63
  return {
32
64
  root,
@@ -76,30 +108,7 @@ async function getSelectedProjectsGraph(filter = commander.program.getOptionValu
76
108
  throw new Error(`not supported package manager ${exports.type}`);
77
109
  }
78
110
 
79
- let wd;
80
- let notWorkspace = false;
81
- function getWD() {
82
- if (wd) return { wd, notWorkspace };
83
- const root = getRoot.getRoot();
84
- if (root !== void 0) {
85
- const isWorkspace = getWorkspaceDir.isWorkspaceDir(root, exports.type);
86
- notWorkspace = !isWorkspace;
87
- wd = root;
88
- return { wd, notWorkspace };
89
- }
90
- try {
91
- wd = getWorkspaceDir.getWorkspaceDir(exports.type);
92
- } catch (e) {
93
- if ("message" in e && e.message === "workspace root not found") {
94
- wd = root ?? process.cwd();
95
- notWorkspace = true;
96
- } else {
97
- throw e;
98
- }
99
- }
100
- return { wd, notWorkspace };
101
- }
102
-
103
111
  exports.filterPackagesGraph = filterPackagesGraph;
104
112
  exports.getSelectedProjectsGraph = getSelectedProjectsGraph;
105
113
  exports.getWD = getWD;
114
+ exports.require = require$1;
@@ -1,11 +1,44 @@
1
- import { isWorkspaceDir, getWorkspaceDir } from '@jiek/utils/getWorkspaceDir';
2
- import { r as require } from './jiek_create-require.CxSGbkTB.js';
1
+ import { createRequire } from 'node:module';
3
2
  import fs from 'node:fs';
4
3
  import path from 'node:path';
5
4
  import process$1 from 'node:process';
6
5
  import { program } from 'commander';
7
6
  import { load } from 'js-yaml';
8
- import { getRoot } from '../utils/getRoot.js';
7
+ import { isWorkspaceDir, getWorkspaceDir } from '@jiek/utils/getWorkspaceDir';
8
+
9
+ var require = /* @__PURE__ */ createRequire(import.meta.url);
10
+
11
+ let root;
12
+ function getRoot() {
13
+ if (root) return root;
14
+ const rootOption = process.env.JIEK_ROOT;
15
+ root = rootOption ? path.isAbsolute(rootOption) ? rootOption : path.resolve(process.cwd(), rootOption) : void 0;
16
+ return root;
17
+ }
18
+
19
+ let wd;
20
+ let notWorkspace = false;
21
+ function getWD() {
22
+ if (wd) return { wd, notWorkspace };
23
+ const root = getRoot();
24
+ if (root !== void 0) {
25
+ const isWorkspace = isWorkspaceDir(root, type);
26
+ notWorkspace = !isWorkspace;
27
+ wd = root;
28
+ return { wd, notWorkspace };
29
+ }
30
+ try {
31
+ wd = getWorkspaceDir(type);
32
+ } catch (e) {
33
+ if ("message" in e && e.message === "workspace root not found") {
34
+ wd = root ?? process.cwd();
35
+ notWorkspace = true;
36
+ } else {
37
+ throw e;
38
+ }
39
+ }
40
+ return { wd, notWorkspace };
41
+ }
9
42
 
10
43
  let type = "";
11
44
  try {
@@ -68,28 +101,4 @@ async function getSelectedProjectsGraph(filter = program.getOptionValue("filter"
68
101
  throw new Error(`not supported package manager ${type}`);
69
102
  }
70
103
 
71
- let wd;
72
- let notWorkspace = false;
73
- function getWD() {
74
- if (wd) return { wd, notWorkspace };
75
- const root = getRoot();
76
- if (root !== void 0) {
77
- const isWorkspace = isWorkspaceDir(root, type);
78
- notWorkspace = !isWorkspace;
79
- wd = root;
80
- return { wd, notWorkspace };
81
- }
82
- try {
83
- wd = getWorkspaceDir(type);
84
- } catch (e) {
85
- if ("message" in e && e.message === "workspace root not found") {
86
- wd = root ?? process.cwd();
87
- notWorkspace = true;
88
- } else {
89
- throw e;
90
- }
91
- }
92
- return { wd, notWorkspace };
93
- }
94
-
95
- export { getSelectedProjectsGraph as a, filterPackagesGraph as f, getWD as g, type as t };
104
+ export { getSelectedProjectsGraph as a, filterPackagesGraph as f, getWD as g, require as r, type as t };