jiek 2.2.6 → 2.2.7-alpha.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.
- package/bin/build.cjs +2 -0
- package/bin/index.cjs +2 -0
- package/bin-helper/index.cjs +31 -0
- package/bin-helper/index.d.cts +1 -0
- package/bin-helper/index.d.ts +1 -0
- package/bin-helper/package.json +5 -1
- package/dist/.internal/+/bin/parseArgv.cjs +33 -0
- package/dist/.internal/+/bin/parseArgv.d.cts +5 -0
- package/dist/.internal/+/bin/parseArgv.d.ts +5 -0
- package/dist/.internal/+/bin/parseArgv.js +27 -0
- package/dist/.internal/+/bridge.cjs +12 -0
- package/dist/.internal/+/bridge.d.cts +39 -0
- package/dist/.internal/+/bridge.d.ts +39 -0
- package/dist/.internal/+/bridge.js +9 -0
- package/dist/.internal/+/commands/build/analyzer.cjs +201 -0
- package/dist/.internal/+/commands/build/analyzer.d.cts +30 -0
- package/dist/.internal/+/commands/build/analyzer.d.ts +30 -0
- package/dist/.internal/+/commands/build/analyzer.js +195 -0
- package/dist/.internal/+/commands/descriptions.cjs +21 -0
- package/dist/.internal/+/commands/descriptions.d.cts +5 -0
- package/dist/.internal/+/commands/descriptions.d.ts +5 -0
- package/dist/.internal/+/commands/descriptions.js +17 -0
- package/dist/.internal/+/commands/meta.cjs +16 -0
- package/dist/.internal/+/commands/meta.d.cts +3 -0
- package/dist/.internal/+/commands/meta.d.ts +3 -0
- package/dist/.internal/+/commands/meta.js +15 -0
- package/dist/.internal/+/commands/utils/optionParser.cjs +8 -0
- package/dist/.internal/+/commands/utils/optionParser.d.cts +3 -0
- package/dist/.internal/+/commands/utils/optionParser.d.ts +3 -0
- package/dist/.internal/+/commands/utils/optionParser.js +6 -0
- package/dist/.internal/+/rollup/base.cjs +10 -0
- package/dist/{cli-only-build.d.cts → .internal/+/rollup/base.d.cts} +8 -15
- package/dist/{cli-only-build.d.ts → .internal/+/rollup/base.d.ts} +8 -15
- package/dist/.internal/+/rollup/base.js +7 -0
- package/dist/.internal/+/rollup/bundle-analyzer.cjs +51 -0
- package/dist/.internal/+/rollup/bundle-analyzer.d.cts +92 -0
- package/dist/.internal/+/rollup/bundle-analyzer.d.ts +92 -0
- package/dist/.internal/+/rollup/bundle-analyzer.js +45 -0
- package/dist/.internal/+/server.cjs +33 -0
- package/dist/.internal/+/server.d.cts +8 -0
- package/dist/.internal/+/server.d.ts +8 -0
- package/dist/.internal/+/server.js +27 -0
- package/dist/.internal/+/utils/checkDependency.cjs +39 -0
- package/dist/.internal/+/utils/checkDependency.d.cts +3 -0
- package/dist/.internal/+/utils/checkDependency.d.ts +3 -0
- package/dist/.internal/+/utils/checkDependency.js +34 -0
- package/dist/.internal/+/utils/filterSupport.cjs +20 -0
- package/dist/.internal/+/utils/filterSupport.d.cts +15 -0
- package/dist/.internal/+/utils/filterSupport.d.ts +15 -0
- package/dist/.internal/+/utils/filterSupport.js +10 -0
- package/dist/.internal/+/utils/getInternalModuleName.cjs +5 -0
- package/dist/.internal/+/utils/getInternalModuleName.d.cts +3 -0
- package/dist/.internal/+/utils/getInternalModuleName.d.ts +3 -0
- package/dist/.internal/+/utils/getInternalModuleName.js +3 -0
- package/dist/.internal/+/utils/getRoot.cjs +17 -0
- package/dist/.internal/+/utils/getRoot.d.cts +3 -0
- package/dist/.internal/+/utils/getRoot.d.ts +3 -0
- package/dist/.internal/+/utils/getRoot.js +11 -0
- package/dist/.internal/+/utils/getWD.cjs +15 -0
- package/dist/.internal/+/utils/getWD.d.cts +6 -0
- package/dist/.internal/+/utils/getWD.d.ts +6 -0
- package/dist/.internal/+/utils/getWD.js +10 -0
- package/dist/.internal/+/utils/intersection.cjs +5 -0
- package/dist/.internal/+/utils/intersection.d.cts +3 -0
- package/dist/.internal/+/utils/intersection.d.ts +3 -0
- package/dist/.internal/+/utils/intersection.js +3 -0
- package/dist/.internal/+/utils/loadConfig.cjs +100 -0
- package/dist/.internal/+/utils/loadConfig.d.cts +10 -0
- package/dist/.internal/+/utils/loadConfig.d.ts +10 -0
- package/dist/.internal/+/utils/loadConfig.js +94 -0
- package/dist/.internal/+/utils/recursiveListFiles.cjs +19 -0
- package/dist/.internal/+/utils/recursiveListFiles.d.cts +3 -0
- package/dist/.internal/+/utils/recursiveListFiles.d.ts +3 -0
- package/dist/.internal/+/utils/recursiveListFiles.js +13 -0
- package/dist/.internal/+/utils/resolveExports.cjs +118 -0
- package/dist/.internal/+/utils/resolveExports.d.cts +26 -0
- package/dist/.internal/+/utils/resolveExports.d.ts +26 -0
- package/dist/.internal/+/utils/resolveExports.js +111 -0
- package/dist/.internal/+/utils/ts.cjs +68 -0
- package/dist/.internal/+/utils/ts.d.cts +3 -0
- package/dist/.internal/+/utils/ts.d.ts +3 -0
- package/dist/.internal/+/utils/ts.js +62 -0
- package/dist/.internal/+/utils/tsRegister.cjs +25 -0
- package/dist/.internal/+/utils/tsRegister.d.cts +3 -0
- package/dist/.internal/+/utils/tsRegister.d.ts +3 -0
- package/dist/.internal/+/utils/tsRegister.js +26 -0
- package/dist/.internal/getWD-BRJ3PK1S.js +105 -0
- package/dist/.internal/getWD-Cmxzjf-f.js +95 -0
- package/dist/{cli.js → .internal/index-B6RQz1DZ.js} +1 -735
- package/dist/{cli.cjs → .internal/index-DlHFuTjM.js} +1 -757
- package/dist/.internal/jiek_create-require-CWFWNQHj.js +5 -0
- package/dist/.internal/jiek_create-require-CxSGbkTB.js +5 -0
- package/dist/.internal/package.json +10 -0
- package/dist/bin/build.cjs +505 -0
- package/dist/bin/index.cjs +488 -0
- package/dist/index.d.cts +1 -113
- package/dist/index.d.ts +1 -113
- package/dist/rollup/index.cjs +282 -4569
- package/dist/rollup/index.d.cts +7 -1
- package/dist/rollup/index.d.ts +7 -1
- package/dist/rollup/index.js +270 -4554
- package/package.json +25 -28
- package/src/bin/build.cts +11 -0
- package/src/bin/index.cts +6 -0
- package/src/bridge.ts +1 -1
- package/src/commands/base.ts +3 -3
- package/src/commands/build/analyzer.ts +5 -5
- package/src/commands/build/client/analyzer.tsx +1 -1
- package/src/commands/build/client/index.ts +5 -7
- package/src/commands/build.ts +218 -209
- package/src/commands/meta.ts +1 -1
- package/src/commands/publish.ts +87 -25
- package/src/rollup/base.ts +2 -2
- package/src/rollup/index.ts +309 -115
- package/src/rollup/plugins/with-external.ts +23 -0
- package/src/rollup/utils/externalResolver.ts +20 -8
- package/src/utils/checkDependency.ts +1 -1
- package/src/utils/filterSupport.ts +17 -16
- package/src/utils/getInternalModuleName.ts +5 -0
- package/src/utils/intersection.ts +1 -0
- package/src/utils/{recusiveListFiles.ts → recursiveListFiles.ts} +2 -2
- package/src/utils/{getExports.ts → resolveExports.ts} +16 -14
- package/bin/jiek-build.js +0 -16
- package/bin/jiek.js +0 -13
- package/bin-helper.cjs +0 -43
- package/cli/package.json +0 -1
- package/cli-only-build/package.json +0 -1
- package/dist/cli-only-build.cjs +0 -977
- package/dist/cli-only-build.js +0 -969
- package/dist/cli.d.cts +0 -14
- package/dist/cli.d.ts +0 -14
- package/src/bin/build.ts +0 -0
- package/src/cli-only-build.ts +0 -11
- package/src/cli.ts +0 -6
- /package/{bin-helper.js → bin-helper/index.js} +0 -0
- /package/src/{parseArgv.ts → bin/parseArgv.ts} +0 -0
package/dist/index.d.ts
CHANGED
@@ -1,116 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import * as rollup_plugin_swc3 from 'rollup-plugin-swc3';
|
3
|
-
import * as rollup_plugin_esbuild from 'rollup-plugin-esbuild';
|
4
|
-
import { InputPluginOption, OutputOptions } from 'rollup';
|
5
|
-
|
6
|
-
type Mapping2ROO<K extends keyof OutputOptions> = OutputOptions[K] | {
|
7
|
-
js?: OutputOptions[K];
|
8
|
-
dts?: OutputOptions[K];
|
9
|
-
};
|
10
|
-
interface ConfigGenerateContext {
|
11
|
-
path: string;
|
12
|
-
name: string;
|
13
|
-
input: string;
|
14
|
-
output: string;
|
15
|
-
external: (string | RegExp)[];
|
16
|
-
pkgIsModule: boolean;
|
17
|
-
conditionals: string[];
|
18
|
-
}
|
19
|
-
type OutputControl = boolean | ((context: ConfigGenerateContext) => boolean);
|
20
|
-
declare const BUILDER_TYPES: readonly ["esbuild", "swc"];
|
21
|
-
interface TemplateOptions {
|
22
|
-
/**
|
23
|
-
* When the user configures type: module, the generated output from entry points that don't
|
24
|
-
* have cts as a suffix will automatically include the CJS version.
|
25
|
-
* if it is not configured, and the generated output from entry points that do not have mts
|
26
|
-
* as a suffix will automatically include the ESM version.
|
27
|
-
*
|
28
|
-
* @default true
|
29
|
-
*/
|
30
|
-
crossModuleConvertor?: boolean;
|
31
|
-
/**
|
32
|
-
* Auto-detect the builder from the installed dependencies.
|
33
|
-
* If the builder is not installed, it will prompt the user to install it.
|
34
|
-
* If exists multiple builders, it will fall back to the 'esbuild'.
|
35
|
-
*
|
36
|
-
* @default 'esbuild'
|
37
|
-
*/
|
38
|
-
builder?: typeof BUILDER_TYPES[number] | ({
|
39
|
-
type: 'esbuild';
|
40
|
-
} & rollup_plugin_esbuild.Options) | ({
|
41
|
-
type: 'swc';
|
42
|
-
} & rollup_plugin_swc3.PluginOptions);
|
43
|
-
features?: {
|
44
|
-
/**
|
45
|
-
* When use esbuild type builder, it will inject `supported.import-attributes` option.
|
46
|
-
* When use swc type builder, it will inject `jsc.experimental.keepImportAttributes` option.
|
47
|
-
*
|
48
|
-
* And it will auto set the rollup output externalImportAttributes and importAttributesKey options.
|
49
|
-
*
|
50
|
-
* @default true
|
51
|
-
*/
|
52
|
-
keepImportAttributes?: boolean | 'assert';
|
53
|
-
};
|
54
|
-
output?: {
|
55
|
-
/**
|
56
|
-
* @default true
|
57
|
-
*
|
58
|
-
* When minify is set to true, the output will with minified files.
|
59
|
-
* When minify is set to 'only-minify', the output will direct output minified files.
|
60
|
-
*/
|
61
|
-
minify?: boolean | 'only-minify';
|
62
|
-
minifyOptions?: typeof BUILDER_TYPES[number] | 'terser' | ({
|
63
|
-
type: 'terser';
|
64
|
-
} & _rollup_plugin_terser.Options) | ({
|
65
|
-
type: 'esbuild';
|
66
|
-
} & Parameters<typeof rollup_plugin_esbuild.minify>[0]) | ({
|
67
|
-
type: 'swc';
|
68
|
-
} & Parameters<typeof rollup_plugin_swc3.minify>[0]);
|
69
|
-
/**
|
70
|
-
* @default 'dist'
|
71
|
-
*/
|
72
|
-
dir?: Mapping2ROO<'dir'>;
|
73
|
-
sourcemap?: Mapping2ROO<'sourcemap'>;
|
74
|
-
strict?: Mapping2ROO<'strict'>;
|
75
|
-
js?: OutputControl;
|
76
|
-
dts?: OutputControl;
|
77
|
-
};
|
78
|
-
/**
|
79
|
-
* Set the external dependencies of the package.
|
80
|
-
*/
|
81
|
-
external?: (string | RegExp)[];
|
82
|
-
plugins?: InputPluginOption | ((type: 'js' | 'dts', context: ConfigGenerateContext) => InputPluginOption) | {
|
83
|
-
js: InputPluginOption;
|
84
|
-
dts?: InputPluginOption;
|
85
|
-
} | {
|
86
|
-
js?: InputPluginOption;
|
87
|
-
dts: InputPluginOption;
|
88
|
-
};
|
89
|
-
/**
|
90
|
-
* https://www.npmjs.com/package/@rollup/plugin-inject#usage
|
91
|
-
*
|
92
|
-
* @example
|
93
|
-
* ```js
|
94
|
-
* {
|
95
|
-
* // import { Promise } from 'es6-promise'
|
96
|
-
* Promise: [ 'es6-promise', 'Promise' ],
|
97
|
-
*
|
98
|
-
* // import { Promise as P } from 'es6-promise'
|
99
|
-
* P: [ 'es6-promise', 'Promise' ],
|
100
|
-
*
|
101
|
-
* // import $ from 'jquery'
|
102
|
-
* $: 'jquery',
|
103
|
-
*
|
104
|
-
* // import * as fs from 'fs'
|
105
|
-
* fs: [ 'fs', '*' ],
|
106
|
-
*
|
107
|
-
* // use a local module instead of a third-party one
|
108
|
-
* 'Object.assign': path.resolve( 'src/helpers/object-assign.js' ),
|
109
|
-
* }
|
110
|
-
* ```
|
111
|
-
*/
|
112
|
-
injects?: Record<string, string | [string, string]>;
|
113
|
-
}
|
1
|
+
import { TemplateOptions } from '@jiek/__internal__/+/rollup/base';
|
114
2
|
|
115
3
|
declare module 'jiek' {
|
116
4
|
interface Config {
|