jiek 2.2.7 → 2.3.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 (100) hide show
  1. package/bin/build.cjs +2 -0
  2. package/bin/index.cjs +2 -0
  3. package/bin-helper/index.cjs +19 -31
  4. package/dist/.internal/.chunks/filterSupport.4rM7f6jB.cjs +114 -0
  5. package/dist/.internal/.chunks/filterSupport.BXWpLBpT.js +104 -0
  6. package/dist/{cli.js → .internal/.chunks/index.B6RQz1DZ.js} +1 -737
  7. package/dist/.internal/.chunks/index.BHuJRlvZ.js +9059 -0
  8. package/dist/.internal/.chunks/index.Daihq2aI.cjs +9071 -0
  9. package/dist/{cli.cjs → .internal/.chunks/index.DlHFuTjM.cjs} +1 -759
  10. package/dist/.internal/.chunks/loadConfig.CFfzkm_p.js +110 -0
  11. package/dist/.internal/.chunks/loadConfig.OOKddvHF.cjs +117 -0
  12. package/dist/{cli-only-build.cjs → .internal/bin/common.cjs} +229 -445
  13. package/dist/.internal/bin/common.d.cts +22 -0
  14. package/dist/.internal/bin/common.d.ts +22 -0
  15. package/dist/{cli-only-build.js → .internal/bin/common.js} +224 -439
  16. package/dist/.internal/bin/parseArgv.cjs +33 -0
  17. package/dist/.internal/bin/parseArgv.d.cts +5 -0
  18. package/dist/.internal/bin/parseArgv.d.ts +5 -0
  19. package/dist/.internal/bin/parseArgv.js +27 -0
  20. package/dist/.internal/bridge.cjs +30 -0
  21. package/dist/.internal/bridge.d.cts +39 -0
  22. package/dist/.internal/bridge.d.ts +39 -0
  23. package/dist/.internal/bridge.js +27 -0
  24. package/dist/.internal/rollup/base.cjs +10 -0
  25. package/dist/{cli-only-build.d.cts → .internal/rollup/base.d.cts} +8 -15
  26. package/dist/{cli-only-build.d.ts → .internal/rollup/base.d.ts} +8 -15
  27. package/dist/.internal/rollup/base.js +7 -0
  28. package/dist/.internal/rollup/bundle-analyzer.cjs +51 -0
  29. package/dist/.internal/rollup/bundle-analyzer.d.cts +92 -0
  30. package/dist/.internal/rollup/bundle-analyzer.d.ts +92 -0
  31. package/dist/.internal/rollup/bundle-analyzer.js +45 -0
  32. package/dist/.internal/utils/filterSupport.cjs +18 -0
  33. package/dist/.internal/utils/filterSupport.d.cts +15 -0
  34. package/dist/.internal/utils/filterSupport.d.ts +15 -0
  35. package/dist/.internal/utils/filterSupport.js +8 -0
  36. package/dist/.internal/utils/getInternalModuleName.cjs +5 -0
  37. package/dist/.internal/utils/getInternalModuleName.d.cts +3 -0
  38. package/dist/.internal/utils/getInternalModuleName.d.ts +3 -0
  39. package/dist/.internal/utils/getInternalModuleName.js +3 -0
  40. package/dist/.internal/utils/intersection.cjs +5 -0
  41. package/dist/.internal/utils/intersection.d.cts +3 -0
  42. package/dist/.internal/utils/intersection.d.ts +3 -0
  43. package/dist/.internal/utils/intersection.js +3 -0
  44. package/dist/.internal/utils/loadConfig.cjs +14 -0
  45. package/dist/.internal/utils/loadConfig.d.cts +10 -0
  46. package/dist/.internal/utils/loadConfig.d.ts +10 -0
  47. package/dist/.internal/utils/loadConfig.js +9 -0
  48. package/dist/.internal/utils/recursiveListFiles.cjs +19 -0
  49. package/dist/.internal/utils/recursiveListFiles.d.cts +3 -0
  50. package/dist/.internal/utils/recursiveListFiles.d.ts +3 -0
  51. package/dist/.internal/utils/recursiveListFiles.js +13 -0
  52. package/dist/.internal/utils/resolveExports.cjs +124 -0
  53. package/dist/.internal/utils/resolveExports.d.cts +27 -0
  54. package/dist/.internal/utils/resolveExports.d.ts +27 -0
  55. package/dist/.internal/utils/resolveExports.js +117 -0
  56. package/dist/.internal/utils/ts.cjs +68 -0
  57. package/dist/.internal/utils/ts.d.cts +3 -0
  58. package/dist/.internal/utils/ts.d.ts +3 -0
  59. package/dist/.internal/utils/ts.js +62 -0
  60. package/dist/bin/build.cjs +10 -0
  61. package/dist/bin/index.cjs +522 -0
  62. package/dist/index.d.cts +16 -114
  63. package/dist/index.d.ts +16 -114
  64. package/dist/rollup/index.cjs +310 -4573
  65. package/dist/rollup/index.d.cts +7 -1
  66. package/dist/rollup/index.d.ts +7 -1
  67. package/dist/rollup/index.js +298 -4558
  68. package/package.json +16 -24
  69. package/src/bin/build.cts +5 -0
  70. package/src/bin/common.ts +3 -0
  71. package/src/bin/index.cts +7 -0
  72. package/src/bridge.ts +1 -1
  73. package/src/commands/base.ts +3 -3
  74. package/src/commands/build/analyzer.ts +5 -5
  75. package/src/commands/build/client/analyzer.tsx +1 -1
  76. package/src/commands/build/client/index.ts +5 -7
  77. package/src/commands/build.ts +244 -213
  78. package/src/commands/meta.ts +1 -1
  79. package/src/commands/publish.ts +190 -78
  80. package/src/index.ts +6 -1
  81. package/src/rollup/base.ts +2 -2
  82. package/src/rollup/index.ts +361 -124
  83. package/src/rollup/plugins/with-external.ts +23 -0
  84. package/src/rollup/utils/externalResolver.ts +20 -8
  85. package/src/utils/checkDependency.ts +1 -1
  86. package/src/utils/filterSupport.ts +17 -16
  87. package/src/utils/getInternalModuleName.ts +5 -0
  88. package/src/utils/intersection.ts +1 -0
  89. package/src/utils/{recusiveListFiles.ts → recursiveListFiles.ts} +2 -2
  90. package/src/utils/{getExports.ts → resolveExports.ts} +28 -19
  91. package/bin/jiek-build.js +0 -16
  92. package/bin/jiek.js +0 -13
  93. package/cli/package.json +0 -1
  94. package/cli-only-build/package.json +0 -1
  95. package/dist/cli.d.cts +0 -14
  96. package/dist/cli.d.ts +0 -14
  97. package/src/cli-only-build.ts +0 -11
  98. package/src/cli.ts +0 -6
  99. /package/{src/bin/build.ts → .jiek-production-tag} +0 -0
  100. /package/src/{parseArgv.ts → bin/parseArgv.ts} +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jiek",
3
3
  "type": "module",
4
- "version": "2.2.7",
4
+ "version": "2.3.1",
5
5
  "description": "A lightweight toolkit for compiling and managing libraries based on `package.json` metadata and suitable for `Monorepo`.",
6
6
  "author": "YiJie <yijie4188@gmail.com>",
7
7
  "homepage": "https://github.com/NWYLZW/jiek/tree/master/packages/jiek#readme",
@@ -31,16 +31,6 @@
31
31
  "require": "./bin-helper/index.cjs",
32
32
  "default": "./bin-helper/index.js"
33
33
  },
34
- "./cli": {
35
- "jiek/__source__": "./src/cli.ts",
36
- "require": "./dist/cli.cjs",
37
- "default": "./dist/cli.js"
38
- },
39
- "./cli-only-build": {
40
- "jiek/__source__": "./src/cli-only-build.ts",
41
- "require": "./dist/cli-only-build.cjs",
42
- "default": "./dist/cli-only-build.js"
43
- },
44
34
  "./rollup": {
45
35
  "jiek/__source__": "./src/rollup/index.ts",
46
36
  "require": "./dist/rollup/index.cjs",
@@ -48,17 +38,17 @@
48
38
  }
49
39
  },
50
40
  "imports": {
51
- "#~/*": [
52
- "./src/*",
53
- "./src/*/index.ts",
54
- "./src/*/index.tsx"
55
- ]
41
+ "#~/*": {
42
+ "jiek/__source__": "./src/*.ts",
43
+ "require": "./dist/.internal/*.cjs",
44
+ "default": "./dist/.internal/*.js"
45
+ }
56
46
  },
57
47
  "bin": {
58
- "jiek": "bin/jiek.js",
59
- "jk": "bin/jiek.js",
60
- "jiek-build": "bin/jiek-build.js",
61
- "jb": "bin/jiek-build.js"
48
+ "jiek": "bin/index.cjs",
49
+ "jk": "bin/index.cjs",
50
+ "jiek-build": "bin/build.cjs",
51
+ "jb": "bin/build.cjs"
62
52
  },
63
53
  "peerDependencies": {
64
54
  "@pnpm/filter-workspace-packages": "^7.2.13||^8.0.0||^9.0.0||^10.0.0||>=1000.0.0",
@@ -69,11 +59,11 @@
69
59
  "rollup-plugin-postcss": "^4.0.2",
70
60
  "rollup-plugin-swc3": "^0.12.1",
71
61
  "typescript": "^4.0.0||^5.0.0",
72
- "vite-bundle-analyzer": "0.16.0-beta.1"
62
+ "vite-bundle-analyzer": "0.16.0-beta.3"
73
63
  },
74
64
  "dependencies": {
75
65
  "@inquirer/prompts": "^7.2.0",
76
- "@jiek/rollup-plugin-dts": "^6.2.1",
66
+ "@jiek/rollup-plugin-dts": "^6.3.8",
77
67
  "@rollup/plugin-commonjs": "^28.0.0",
78
68
  "@rollup/plugin-inject": "^5.0.5",
79
69
  "@rollup/plugin-json": "^6.0.1",
@@ -81,14 +71,16 @@
81
71
  "cli-progress": "^3.12.0",
82
72
  "commander": "^12.0.0",
83
73
  "detect-indent": "^6.1.0",
84
- "execa": "~9.3.1",
85
74
  "js-yaml": "^4.1.0",
86
75
  "jsonc-parser": "^3.2.1",
87
76
  "koa": "^2.15.3",
88
77
  "rollup": "^4.0.0",
89
- "@jiek/pkger": "^0.2.1",
78
+ "@jiek/pkger": "^0.2.2",
90
79
  "@jiek/utils": "^0.2.3"
91
80
  },
81
+ "publishConfig": {
82
+ "directory": "./dist/.internal"
83
+ },
92
84
  "peerDependenciesMeta": {
93
85
  "@pnpm/filter-workspace-packages": {
94
86
  "optional": true
@@ -0,0 +1,5 @@
1
+ import '#~/bin/common'
2
+
3
+ import parseArgv from '#~/bin/parseArgv'
4
+
5
+ parseArgv()
@@ -0,0 +1,3 @@
1
+ import '../utils/filterSupport'
2
+ import '../commands/base'
3
+ import '../commands/build'
@@ -0,0 +1,7 @@
1
+ import '#~/bin/common'
2
+
3
+ import '../commands/publish'
4
+
5
+ import parseArgv from '#~/bin/parseArgv'
6
+
7
+ parseArgv()
package/src/bridge.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Module } from '#~/rollup/bundle-analyzer.ts'
1
+ import type { Module } from '#~/rollup/bundle-analyzer'
2
2
 
3
3
  import { sendMessage } from 'execa'
4
4
 
@@ -1,9 +1,9 @@
1
1
  import { program } from 'commander'
2
2
  import pkg from 'jiek/package.json'
3
3
 
4
- import { filterDescription } from '#~/commands/descriptions.ts'
5
- import { IS_WORKSPACE } from '#~/commands/meta.ts'
6
- import { type } from '#~/utils/filterSupport.ts'
4
+ import { filterDescription } from '#~/commands/descriptions'
5
+ import { IS_WORKSPACE } from '#~/commands/meta'
6
+ import { type } from '#~/utils/filterSupport'
7
7
 
8
8
  program
9
9
  .name('jk/jiek')
@@ -1,10 +1,10 @@
1
1
  import type { Command } from 'commander'
2
2
 
3
- import { CLIENT_CUSTOM_RENDER_SCRIPT } from '#~/commands/build/client/index.ts'
4
- import { parseBoolean } from '#~/commands/utils/optionParser.ts'
5
- import type { Module } from '#~/rollup/bundle-analyzer.ts'
6
- import type { createServer } from '#~/server.ts'
7
- import { checkDependency } from '#~/utils/checkDependency.ts'
3
+ import { CLIENT_CUSTOM_RENDER_SCRIPT } from '#~/commands/build/client/index'
4
+ import { parseBoolean } from '#~/commands/utils/optionParser'
5
+ import type { Module } from '#~/rollup/bundle-analyzer'
6
+ import type { createServer } from '#~/server'
7
+ import { checkDependency } from '#~/utils/checkDependency'
8
8
  import { existsSync, mkdirSync, statSync, writeFileSync } from 'node:fs'
9
9
  import path from 'node:path'
10
10
 
@@ -1,4 +1,4 @@
1
- import type { Module } from '#~/rollup/bundle-analyzer.ts'
1
+ import type { Module } from '#~/rollup/bundle-analyzer'
2
2
 
3
3
  interface Node {
4
4
  id: string
@@ -10,13 +10,11 @@ declare global {
10
10
  function render() {
11
11
  CUSTOM_SIDE_BAR = true
12
12
  window.addEventListener('client:ready', () =>
13
- setTimeout(() => {
14
- window.dispatchEvent(
15
- new CustomEvent('send:ui', {
16
- detail: { type: 'Main', Component: __REPLACE_INJECT__ }
17
- })
18
- )
19
- }, 0))
13
+ window.dispatchEvent(
14
+ new CustomEvent('send:ui', {
15
+ detail: { type: 'Main', Component: __REPLACE_INJECT__ }
16
+ })
17
+ ))
20
18
  }
21
19
 
22
20
  export const CLIENT_CUSTOM_RENDER_SCRIPT = [