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
@@ -1,11 +1,29 @@
1
1
  'use strict';
2
2
 
3
- var execa = require('execa');
3
+ var index = require('./.chunks/index.Daihq2aI.cjs');
4
+ require('node:url');
5
+ require('node:child_process');
6
+ require('node:string_decoder');
7
+ require('node:util');
8
+ require('node:process');
9
+ require('node:fs');
10
+ require('node:tty');
11
+ require('node:path');
12
+ require('child_process');
13
+ require('path');
14
+ require('fs');
15
+ require('node:timers/promises');
16
+ require('node:os');
17
+ require('node:events');
18
+ require('node:v8');
19
+ require('node:stream');
20
+ require('node:buffer');
21
+ require('node:stream/promises');
4
22
 
5
23
  const bridgeDisabledRef = { value: false };
6
24
  const publish = async (type, data) => {
7
25
  if (bridgeDisabledRef.value) return Promise.resolve();
8
- return execa.sendMessage({ type, data });
26
+ return index.sendMessage({ type, data });
9
27
  };
10
28
 
11
29
  exports.bridgeDisabledRef = bridgeDisabledRef;
@@ -1,4 +1,22 @@
1
- import { sendMessage } from 'execa';
1
+ import { s as sendMessage } from './.chunks/index.BHuJRlvZ.js';
2
+ import 'node:url';
3
+ import 'node:child_process';
4
+ import 'node:string_decoder';
5
+ import 'node:util';
6
+ import 'node:process';
7
+ import 'node:fs';
8
+ import 'node:tty';
9
+ import 'node:path';
10
+ import 'child_process';
11
+ import 'path';
12
+ import 'fs';
13
+ import 'node:timers/promises';
14
+ import 'node:os';
15
+ import 'node:events';
16
+ import 'node:v8';
17
+ import 'node:stream';
18
+ import 'node:buffer';
19
+ import 'node:stream/promises';
2
20
 
3
21
  const bridgeDisabledRef = { value: false };
4
22
  const publish = async (type, data) => {
@@ -1,13 +1,11 @@
1
1
  'use strict';
2
2
 
3
- require('../.chunks/jiek_create-require.CWFWNQHj.cjs');
3
+ var filterSupport = require('../.chunks/filterSupport.4rM7f6jB.cjs');
4
4
  require('node:fs');
5
5
  require('node:path');
6
6
  require('node:process');
7
7
  require('commander');
8
8
  require('js-yaml');
9
- require('./getRoot.cjs');
10
- var filterSupport = require('../.chunks/getWD.ZF0avqDB.cjs');
11
9
  require('@jiek/utils/getWorkspaceDir');
12
10
 
13
11
 
@@ -1,10 +1,8 @@
1
- import '../.chunks/jiek_create-require.CxSGbkTB.js';
1
+ export { f as filterPackagesGraph, a as getSelectedProjectsGraph, t as type } from '../.chunks/filterSupport.BXWpLBpT.js';
2
2
  import 'node:fs';
3
3
  import 'node:path';
4
4
  import 'node:process';
5
5
  import 'commander';
6
6
  import 'js-yaml';
7
- import './getRoot.js';
8
- export { f as filterPackagesGraph, a as getSelectedProjectsGraph, t as type } from '../.chunks/getWD.D6wq8Qc2.js';
9
7
  import 'node:module';
10
8
  import '@jiek/utils/getWorkspaceDir';
@@ -1,100 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var jiek_createRequire = require('../.chunks/jiek_create-require.CWFWNQHj.cjs');
4
- var fs = require('node:fs');
5
- var path = require('node:path');
6
- var commander = require('commander');
7
- var jsYaml = require('js-yaml');
8
- var filterSupport = require('../.chunks/getWD.ZF0avqDB.cjs');
9
- var tsRegister = require('./tsRegister.cjs');
10
- require('@jiek/utils/getWorkspaceDir');
3
+ require('../.chunks/filterSupport.4rM7f6jB.cjs');
4
+ require('node:fs');
5
+ require('node:path');
6
+ require('commander');
7
+ require('js-yaml');
8
+ var loadConfig = require('../.chunks/loadConfig.OOKddvHF.cjs');
11
9
  require('node:process');
12
- require('./getRoot.cjs');
13
-
14
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
+ require('@jiek/utils/getWorkspaceDir');
15
11
 
16
- var fs__default = /*#__PURE__*/_interopDefault(fs);
17
- var path__default = /*#__PURE__*/_interopDefault(path);
18
12
 
19
- let configName = "jiek.config";
20
- function getConfigPath(root, dir) {
21
- const isSupportTsLoader = !!tsRegister.tsRegisterName;
22
- function configWithExtIsExist(ext) {
23
- const filenames = [
24
- path__default.default.resolve(process.cwd(), `${configName}.${ext}`),
25
- path__default.default.resolve(process.cwd(), `.${configName}.${ext}`),
26
- path__default.default.resolve(root, `${configName}.${ext}`),
27
- path__default.default.resolve(root, `.${configName}.${ext}`)
28
- ];
29
- if (dir) {
30
- filenames.unshift(...[
31
- path__default.default.resolve(dir, `${configName}.${ext}`),
32
- path__default.default.resolve(dir, `.${configName}.${ext}`)
33
- ]);
34
- }
35
- for (const filename of filenames) {
36
- if (fs__default.default.existsSync(filename) && fs__default.default.lstatSync(filename).isFile()) {
37
- return filename;
38
- }
39
- }
40
- return;
41
- }
42
- configName = configWithExtIsExist("js") ?? configName;
43
- configName = configWithExtIsExist("json") ?? configName;
44
- configName = configWithExtIsExist("yaml") ?? configName;
45
- if (isSupportTsLoader) {
46
- configName = configWithExtIsExist("ts") ?? configName;
47
- }
48
- return path__default.default.resolve(root, configName);
49
- }
50
- function loadConfig(dirOrOptions) {
51
- let dir;
52
- let root;
53
- if (typeof dirOrOptions === "object") {
54
- dir = dirOrOptions.dir;
55
- root = dirOrOptions.root ?? filterSupport.getWD().wd;
56
- } else {
57
- dir = dirOrOptions;
58
- root = filterSupport.getWD().wd;
59
- }
60
- let configPath = commander.program.getOptionValue("configPath");
61
- if (!configPath) {
62
- configPath = getConfigPath(root, dir);
63
- } else {
64
- if (!fs__default.default.existsSync(configPath)) {
65
- throw new Error(`config file not found: ${configPath}`);
66
- }
67
- if (!path__default.default.isAbsolute(configPath)) {
68
- configPath = path__default.default.resolve(root, configPath);
69
- }
70
- }
71
- const ext = path__default.default.extname(configPath);
72
- let module;
73
- switch (ext) {
74
- case ".js":
75
- module = jiek_createRequire.require(configPath);
76
- break;
77
- case ".json":
78
- return jiek_createRequire.require(configPath);
79
- case ".yaml":
80
- return jsYaml.load(fs__default.default.readFileSync(configPath, "utf-8"));
81
- case ".ts":
82
- if (tsRegister.tsRegisterName) {
83
- jiek_createRequire.require(tsRegister.tsRegisterName);
84
- module = jiek_createRequire.require(configPath);
85
- break;
86
- }
87
- throw new Error(
88
- "ts config file is not supported without ts register, please install esbuild-register or set JIEK_TS_REGISTER env for custom ts register"
89
- );
90
- case ".config":
91
- module = {};
92
- break;
93
- default:
94
- throw new Error(`unsupported config file type: ${ext}`);
95
- }
96
- if (!module) throw new Error("config file is empty");
97
- return module.default ?? module;
98
- }
99
13
 
100
- exports.loadConfig = loadConfig;
14
+ exports.loadConfig = loadConfig.loadConfig;
@@ -1,94 +1,9 @@
1
- import { r as require } from '../.chunks/jiek_create-require.CxSGbkTB.js';
2
- import fs from 'node:fs';
3
- import path from 'node:path';
4
- import { program } from 'commander';
5
- import { load } from 'js-yaml';
6
- import { g as getWD } from '../.chunks/getWD.D6wq8Qc2.js';
7
- import { tsRegisterName } from './tsRegister.js';
1
+ import '../.chunks/filterSupport.BXWpLBpT.js';
2
+ import 'node:fs';
3
+ import 'node:path';
4
+ import 'commander';
5
+ import 'js-yaml';
6
+ export { l as loadConfig } from '../.chunks/loadConfig.CFfzkm_p.js';
8
7
  import 'node:module';
9
- import '@jiek/utils/getWorkspaceDir';
10
8
  import 'node:process';
11
- import './getRoot.js';
12
-
13
- let configName = "jiek.config";
14
- function getConfigPath(root, dir) {
15
- const isSupportTsLoader = !!tsRegisterName;
16
- function configWithExtIsExist(ext) {
17
- const filenames = [
18
- path.resolve(process.cwd(), `${configName}.${ext}`),
19
- path.resolve(process.cwd(), `.${configName}.${ext}`),
20
- path.resolve(root, `${configName}.${ext}`),
21
- path.resolve(root, `.${configName}.${ext}`)
22
- ];
23
- if (dir) {
24
- filenames.unshift(...[
25
- path.resolve(dir, `${configName}.${ext}`),
26
- path.resolve(dir, `.${configName}.${ext}`)
27
- ]);
28
- }
29
- for (const filename of filenames) {
30
- if (fs.existsSync(filename) && fs.lstatSync(filename).isFile()) {
31
- return filename;
32
- }
33
- }
34
- return;
35
- }
36
- configName = configWithExtIsExist("js") ?? configName;
37
- configName = configWithExtIsExist("json") ?? configName;
38
- configName = configWithExtIsExist("yaml") ?? configName;
39
- if (isSupportTsLoader) {
40
- configName = configWithExtIsExist("ts") ?? configName;
41
- }
42
- return path.resolve(root, configName);
43
- }
44
- function loadConfig(dirOrOptions) {
45
- let dir;
46
- let root;
47
- if (typeof dirOrOptions === "object") {
48
- dir = dirOrOptions.dir;
49
- root = dirOrOptions.root ?? getWD().wd;
50
- } else {
51
- dir = dirOrOptions;
52
- root = getWD().wd;
53
- }
54
- let configPath = program.getOptionValue("configPath");
55
- if (!configPath) {
56
- configPath = getConfigPath(root, dir);
57
- } else {
58
- if (!fs.existsSync(configPath)) {
59
- throw new Error(`config file not found: ${configPath}`);
60
- }
61
- if (!path.isAbsolute(configPath)) {
62
- configPath = path.resolve(root, configPath);
63
- }
64
- }
65
- const ext = path.extname(configPath);
66
- let module;
67
- switch (ext) {
68
- case ".js":
69
- module = require(configPath);
70
- break;
71
- case ".json":
72
- return require(configPath);
73
- case ".yaml":
74
- return load(fs.readFileSync(configPath, "utf-8"));
75
- case ".ts":
76
- if (tsRegisterName) {
77
- require(tsRegisterName);
78
- module = require(configPath);
79
- break;
80
- }
81
- throw new Error(
82
- "ts config file is not supported without ts register, please install esbuild-register or set JIEK_TS_REGISTER env for custom ts register"
83
- );
84
- case ".config":
85
- module = {};
86
- break;
87
- default:
88
- throw new Error(`unsupported config file type: ${ext}`);
89
- }
90
- if (!module) throw new Error("config file is empty");
91
- return module.default ?? module;
92
- }
93
-
94
- export { loadConfig };
9
+ import '@jiek/utils/getWorkspaceDir';