@reliverse/dler 1.4.0 → 1.4.2
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/README.md +1 -0
- package/bin/app/deps/impl/analyzer.d.ts +1 -1
- package/bin/app/deps/impl/filesystem.d.ts +1 -1
- package/bin/app/deps/impl/formatter.d.ts +1 -1
- package/bin/app/deps/impl/parser.d.ts +1 -1
- package/bin/app/relifso/init/cmd.js +2 -2
- package/bin/app/relifso/init/{impl/mod.d.ts → init-impl.d.ts} +6 -1
- package/bin/app/relifso/init/{impl/mod.js → init-impl.js} +4 -2
- package/bin/app/relifso/init/{impl/types.d.ts → init-types.d.ts} +1 -1
- package/bin/default.d.ts +1 -1
- package/bin/default.js +2 -1
- package/bin/impl.js +4 -4
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/auto.d.ts +2 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/auto.js +3 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/build.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/copy/copy.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/build.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/config.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/config.js +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/plugins/cjs.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/plugins/esbuild.d.ts +1 -11
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/stub.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/utils.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/watch.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/untyped/index.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/utils.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/validate.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/utils/utils-bump.d.ts +83 -9
- package/bin/libs/sdk/sdk-impl/utils/utils-bump.js +400 -35
- package/bin/libs/sdk/sdk-impl/utils/utils-clean.d.ts +1 -1
- package/bin/libs/sdk/sdk-mod.d.ts +1 -8
- package/bin/libs/sdk/sdk-mod.js +0 -5
- package/bin/libs/sdk/sdk-types.d.ts +328 -12
- package/bin/mod.d.ts +2 -48
- package/package.json +3 -2
- package/bin/app/relifso/init/impl/utils.d.ts +0 -5
- package/bin/app/relifso/init/impl/utils.js +0 -3
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/copy/types.d.ts +0 -9
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/copy/types.js +0 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/types.d.ts +0 -15
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/types.js +0 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/types.d.ts +0 -95
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/types.js +0 -0
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/types.d.ts +0 -176
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/types.js +0 -6
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/untyped/types.d.ts +0 -23
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/untyped/types.js +0 -0
- package/bin/types.d.ts +0 -475
- package/bin/types.js +0 -0
- /package/bin/app/deps/impl/{types.d.ts → deps-types.d.ts} +0 -0
- /package/bin/app/deps/impl/{types.js → deps-types.js} +0 -0
- /package/bin/app/relifso/init/{impl/const.d.ts → init-const.d.ts} +0 -0
- /package/bin/app/relifso/init/{impl/const.js → init-const.js} +0 -0
- /package/bin/app/relifso/init/{impl/types.js → init-types.js} +0 -0
- /package/bin/app/relifso/init/{impl/templates → templates}/t-gitignore.d.ts +0 -0
- /package/bin/app/relifso/init/{impl/templates → templates}/t-gitignore.js +0 -0
- /package/bin/app/relifso/init/{impl/templates → templates}/t-license.d.ts +0 -0
- /package/bin/app/relifso/init/{impl/templates → templates}/t-license.js +0 -0
- /package/bin/app/relifso/init/{impl/templates → templates}/t-readme.d.ts +0 -0
- /package/bin/app/relifso/init/{impl/templates → templates}/t-readme.js +0 -0
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import type { FilterPattern } from "@rollup/pluginutils";
|
|
2
|
+
import type { CommonOptions, Loader } from "esbuild";
|
|
3
|
+
import type { Hookable } from "hookable";
|
|
4
|
+
import type { Jiti, JitiOptions } from "jiti";
|
|
5
|
+
import type { PackageJson } from "pkg-types";
|
|
6
|
+
import type { WatcherOptions } from "rollup";
|
|
7
|
+
import type { Schema } from "untyped";
|
|
1
8
|
/**
|
|
2
9
|
* Defines the configuration for building and publishing packages. This includes: versioning,
|
|
3
10
|
* build settings, publishing options, libraries-dler-plugin built-in plugin, and more.
|
|
@@ -26,16 +33,25 @@ export type BuildPublishConfig = {
|
|
|
26
33
|
*/
|
|
27
34
|
bumpFilter: string[];
|
|
28
35
|
/**
|
|
29
|
-
* Specifies how the version number should be incremented
|
|
30
|
-
* - `
|
|
31
|
-
* - `
|
|
32
|
-
* - `
|
|
36
|
+
* Specifies how the version number should be incremented:
|
|
37
|
+
* - `patch`: Increments the patch version for backwards-compatible bug fixes (1.2.3 → 1.2.4)
|
|
38
|
+
* - `minor`: Increments the minor version for new backwards-compatible features (1.2.3 → 1.3.0)
|
|
39
|
+
* - `major`: Increments the major version for breaking changes (1.2.3 → 2.0.0)
|
|
40
|
+
* - `auto`: Automatically determine the appropriate bump type
|
|
41
|
+
* - `manual`: Set a specific version (requires bumpSet to be set)
|
|
33
42
|
*
|
|
34
43
|
* Please note: `dler` infers the version from the `package.json` file.
|
|
35
44
|
*
|
|
36
|
-
* @default "
|
|
45
|
+
* @default "patch"
|
|
37
46
|
*/
|
|
38
47
|
bumpMode: BumpMode;
|
|
48
|
+
/**
|
|
49
|
+
* Custom version to set when bumpMode is "manual".
|
|
50
|
+
* Must be a valid semver version (e.g., "1.2.3").
|
|
51
|
+
*
|
|
52
|
+
* @default ""
|
|
53
|
+
*/
|
|
54
|
+
bumpSet: string;
|
|
39
55
|
/**
|
|
40
56
|
* When `true`, stops after building and retains distribution folders.
|
|
41
57
|
* Useful for development or inspecting the build output.
|
|
@@ -356,13 +372,6 @@ export type BuildPublishConfig = {
|
|
|
356
372
|
*/
|
|
357
373
|
transpileWatch: boolean;
|
|
358
374
|
};
|
|
359
|
-
/**
|
|
360
|
-
* Supported bump modes for versioning:
|
|
361
|
-
* - autoPatch: 1.2.3 → 1.2.4
|
|
362
|
-
* - autoMinor: 1.2.3 → 1.3.0
|
|
363
|
-
* - autoMajor: 1.2.3 → 2.0.0
|
|
364
|
-
*/
|
|
365
|
-
export type BumpMode = "autoMajor" | "autoMinor" | "autoPatch";
|
|
366
375
|
/**
|
|
367
376
|
* Supported bundler names for building packages:
|
|
368
377
|
* - bun: Bun's built-in bundler for fast builds
|
|
@@ -473,3 +482,310 @@ export type transpileFormat = "cjs" | "esm" | "iife";
|
|
|
473
482
|
* - browser: Optimized for web browsers.
|
|
474
483
|
*/
|
|
475
484
|
export type transpileTarget = "browser" | "bun" | "node";
|
|
485
|
+
export type CopyBuildEntry = BaseBuildEntry & {
|
|
486
|
+
builder: "copy";
|
|
487
|
+
pattern?: string | string[];
|
|
488
|
+
};
|
|
489
|
+
export type CopyHooks = {
|
|
490
|
+
"copy:done": (ctx: BuildContext) => Promise<void> | void;
|
|
491
|
+
"copy:entries": (ctx: BuildContext, entries: CopyBuildEntry[]) => Promise<void> | void;
|
|
492
|
+
};
|
|
493
|
+
import type { MkdistOptions } from "mkdist";
|
|
494
|
+
export type MkdistBuildEntry = _BaseAndMkdist & {
|
|
495
|
+
builder: "mkdist";
|
|
496
|
+
};
|
|
497
|
+
export type MkdistHooks = {
|
|
498
|
+
"mkdist:done": (ctx: BuildContext) => Promise<void> | void;
|
|
499
|
+
"mkdist:entries": (ctx: BuildContext, entries: MkdistBuildEntry[]) => Promise<void> | void;
|
|
500
|
+
"mkdist:entry:build": (ctx: BuildContext, entry: MkdistBuildEntry, output: {
|
|
501
|
+
writtenFiles: string[];
|
|
502
|
+
}) => Promise<void> | void;
|
|
503
|
+
"mkdist:entry:options": (ctx: BuildContext, entry: MkdistBuildEntry, options: MkdistOptions) => Promise<void> | void;
|
|
504
|
+
};
|
|
505
|
+
type _BaseAndMkdist = BaseBuildEntry & MkdistOptions;
|
|
506
|
+
import type { RollupAliasOptions } from "@rollup/plugin-alias";
|
|
507
|
+
import type { RollupCommonJSOptions } from "@rollup/plugin-commonjs";
|
|
508
|
+
import type { RollupJsonOptions } from "@rollup/plugin-json";
|
|
509
|
+
import type { RollupNodeResolveOptions } from "@rollup/plugin-node-resolve";
|
|
510
|
+
import type { RollupReplaceOptions } from "@rollup/plugin-replace";
|
|
511
|
+
import type { RollupOptions as _RollupOptions, OutputOptions, Plugin, RollupBuild } from "rollup";
|
|
512
|
+
import type { Options as RollupDtsOptions } from "rollup-plugin-dts";
|
|
513
|
+
import type { BumpMode } from "./sdk-impl/utils/utils-bump.js";
|
|
514
|
+
export type RollupBuildEntry = BaseBuildEntry & {
|
|
515
|
+
builder: "rollup";
|
|
516
|
+
};
|
|
517
|
+
export type EsbuildOptions = CommonOptions & {
|
|
518
|
+
exclude?: FilterPattern;
|
|
519
|
+
include?: FilterPattern;
|
|
520
|
+
/**
|
|
521
|
+
* Map extension to transpileEsbuild loader
|
|
522
|
+
* Note that each entry (the extension) needs to start with a dot
|
|
523
|
+
*/
|
|
524
|
+
loaders?: Record<string, false | Loader>;
|
|
525
|
+
};
|
|
526
|
+
export type RollupBuildOptions = {
|
|
527
|
+
/**
|
|
528
|
+
* Alias plugin options
|
|
529
|
+
* Set to `false` to disable the plugin.
|
|
530
|
+
* Read more: [@rollup/plugin-alias](https://npmjs.com/package/@rollup/plugin-alias)
|
|
531
|
+
*/
|
|
532
|
+
alias: false | RollupAliasOptions;
|
|
533
|
+
/**
|
|
534
|
+
* If enabled, dler generates CommonJS polyfills for ESM builds.
|
|
535
|
+
*/
|
|
536
|
+
cjsBridge?: boolean;
|
|
537
|
+
/**
|
|
538
|
+
* CommonJS plugin options
|
|
539
|
+
* Set to `false` to disable the plugin.
|
|
540
|
+
* Read more: [@rollup/plugin-commonjs](https://npmjs.com/package/@rollup/plugin-commonjs)
|
|
541
|
+
*/
|
|
542
|
+
commonjs: false | RollupCommonJSOptions;
|
|
543
|
+
/**
|
|
544
|
+
* DTS plugin options
|
|
545
|
+
* Set to `false` to disable the plugin.
|
|
546
|
+
* Read more: [rollup-plugin-dts](https://npmjs.com/package/rollup-plugin-dts)
|
|
547
|
+
*/
|
|
548
|
+
dts: RollupDtsOptions;
|
|
549
|
+
/**
|
|
550
|
+
* If enabled, dler generates a CommonJS build in addition to the ESM build.
|
|
551
|
+
*/
|
|
552
|
+
emitCJS?: boolean;
|
|
553
|
+
/**
|
|
554
|
+
* ESBuild plugin options
|
|
555
|
+
* Set to `false` to disable the plugin.
|
|
556
|
+
* Read more: [transpileEsbuild](https://npmjs.com/package/transpileEsbuild)
|
|
557
|
+
*/
|
|
558
|
+
esbuild: EsbuildOptions | false;
|
|
559
|
+
/**
|
|
560
|
+
* Whether to inline dependencies not explicitly set in "dependencies" or "peerDependencies" or as marked externals to the bundle.
|
|
561
|
+
*
|
|
562
|
+
* If set to true, all such dependencies will be inlined.
|
|
563
|
+
* If an array of string or regular expressions is passed, these will be used to determine whether to inline such a dependency.
|
|
564
|
+
*/
|
|
565
|
+
inlineDependencies?: (RegExp | string)[] | boolean;
|
|
566
|
+
/**
|
|
567
|
+
* JSON plugin options
|
|
568
|
+
* Set to `false` to disable the plugin.
|
|
569
|
+
* Read more: [@rollup/plugin-json](https://npmjs.com/package/@rollup/plugin-json)
|
|
570
|
+
*/
|
|
571
|
+
json: false | RollupJsonOptions;
|
|
572
|
+
/**
|
|
573
|
+
* Rollup [Output Options](https://rollupjs.org/configuration-options)
|
|
574
|
+
*/
|
|
575
|
+
output?: OutputOptions;
|
|
576
|
+
/**
|
|
577
|
+
* Preserve dynamic imports as-is
|
|
578
|
+
*/
|
|
579
|
+
preserveDynamicImports?: boolean;
|
|
580
|
+
/**
|
|
581
|
+
* Replace plugin options
|
|
582
|
+
* Set to `false` to disable the plugin.
|
|
583
|
+
* Read more: [@rollup/plugin-replace](https://npmjs.com/package/@rollup/plugin-replace)
|
|
584
|
+
*/
|
|
585
|
+
replace: false | RollupReplaceOptions;
|
|
586
|
+
/**
|
|
587
|
+
* Resolve plugin options
|
|
588
|
+
* Set to `false` to disable the plugin.
|
|
589
|
+
* Read more: [@rollup/plugin-node-resolve](https://npmjs.com/package/@rollup/plugin-node-resolve)
|
|
590
|
+
*/
|
|
591
|
+
resolve: false | RollupNodeResolveOptions;
|
|
592
|
+
/**
|
|
593
|
+
* Enable experimental active watcher
|
|
594
|
+
*
|
|
595
|
+
* @experimental
|
|
596
|
+
*/
|
|
597
|
+
watch?: boolean;
|
|
598
|
+
};
|
|
599
|
+
export type RollupHooks = {
|
|
600
|
+
"rollup:build": (ctx: BuildContext, build: RollupBuild) => Promise<void> | void;
|
|
601
|
+
"rollup:done": (ctx: BuildContext) => Promise<void> | void;
|
|
602
|
+
"rollup:dts:build": (ctx: BuildContext, build: RollupBuild) => Promise<void> | void;
|
|
603
|
+
"rollup:dts:options": (ctx: BuildContext, options: RollupOptions) => Promise<void> | void;
|
|
604
|
+
"rollup:options": (ctx: BuildContext, options: RollupOptions) => Promise<void> | void;
|
|
605
|
+
};
|
|
606
|
+
export type RollupOptions = _RollupOptions & {
|
|
607
|
+
plugins: Plugin[];
|
|
608
|
+
};
|
|
609
|
+
export type UntypedBuildEntry = BaseBuildEntry & {
|
|
610
|
+
builder: "untyped";
|
|
611
|
+
defaults?: Record<string, any>;
|
|
612
|
+
};
|
|
613
|
+
export type UntypedHooks = {
|
|
614
|
+
"untyped:done": (ctx: BuildContext) => Promise<void> | void;
|
|
615
|
+
"untyped:entries": (ctx: BuildContext, entries: UntypedBuildEntry[]) => Promise<void> | void;
|
|
616
|
+
"untyped:entry:options": (ctx: BuildContext, entry: UntypedBuildEntry, options: any) => Promise<void> | void;
|
|
617
|
+
"untyped:entry:outputs": (ctx: BuildContext, entry: UntypedBuildEntry, outputs: UntypedOutputs) => Promise<void> | void;
|
|
618
|
+
"untyped:entry:schema": (ctx: BuildContext, entry: UntypedBuildEntry, schema: Schema) => Promise<void> | void;
|
|
619
|
+
};
|
|
620
|
+
export type UntypedOutput = {
|
|
621
|
+
contents: string;
|
|
622
|
+
fileName: string;
|
|
623
|
+
};
|
|
624
|
+
export type UntypedOutputs = {
|
|
625
|
+
declaration?: UntypedOutput;
|
|
626
|
+
defaults: UntypedOutput;
|
|
627
|
+
markdown: UntypedOutput;
|
|
628
|
+
schema: UntypedOutput;
|
|
629
|
+
};
|
|
630
|
+
export type BaseBuildEntry = {
|
|
631
|
+
builder?: "copy" | "mkdist" | "rollup" | "untyped";
|
|
632
|
+
declaration?: "compatible" | "node16" | boolean;
|
|
633
|
+
input: string;
|
|
634
|
+
name?: string;
|
|
635
|
+
outDir?: string;
|
|
636
|
+
isLib: boolean;
|
|
637
|
+
};
|
|
638
|
+
export type BuildContext = {
|
|
639
|
+
buildEntries: {
|
|
640
|
+
bytes?: number;
|
|
641
|
+
chunk?: boolean;
|
|
642
|
+
chunks?: string[];
|
|
643
|
+
exports?: string[];
|
|
644
|
+
modules?: {
|
|
645
|
+
bytes: number;
|
|
646
|
+
id: string;
|
|
647
|
+
}[];
|
|
648
|
+
path: string;
|
|
649
|
+
isLib: boolean;
|
|
650
|
+
}[];
|
|
651
|
+
hooks: Hookable<BuildHooks>;
|
|
652
|
+
jiti: Jiti;
|
|
653
|
+
options: BuildOptions;
|
|
654
|
+
pkg: PackageJson;
|
|
655
|
+
usedImports: Set<string>;
|
|
656
|
+
warnings: Set<string>;
|
|
657
|
+
isLib: boolean;
|
|
658
|
+
};
|
|
659
|
+
export type BuildEntry = BaseBuildEntry | CopyBuildEntry | MkdistBuildEntry | RollupBuildEntry | UntypedBuildEntry;
|
|
660
|
+
export type BuildHooks = CopyHooks & MkdistHooks & RollupHooks & UntypedHooks & {
|
|
661
|
+
"build:before": (ctx: BuildContext) => Promise<void> | void;
|
|
662
|
+
"build:done": (ctx: BuildContext) => Promise<void> | void;
|
|
663
|
+
"build:prepare": (ctx: BuildContext) => Promise<void> | void;
|
|
664
|
+
};
|
|
665
|
+
export type BuildOptions = {
|
|
666
|
+
/**
|
|
667
|
+
* Create aliases for module imports to reference modules in code using more concise paths.
|
|
668
|
+
* Allow you to specify an alias for the module path.
|
|
669
|
+
*/
|
|
670
|
+
alias: Record<string, string>;
|
|
671
|
+
/**
|
|
672
|
+
* Clean the output directory before building.
|
|
673
|
+
*/
|
|
674
|
+
clean: boolean;
|
|
675
|
+
/**
|
|
676
|
+
* Whether to generate declaration files.
|
|
677
|
+
* * `compatible` means "src/index.ts" will generate "dist/index.d.mts", "dist/index.d.cts" and "dist/index.d.ts".
|
|
678
|
+
* * `node16` means "src/index.ts" will generate "dist/index.d.mts" and "dist/index.d.cts".
|
|
679
|
+
* * `true` is equivalent to `compatible`.
|
|
680
|
+
* * `false` will disable declaration generation.
|
|
681
|
+
* * `undefined` will auto detect based on "package.json". If "package.json" has "types" field, it will be `"compatible"`, otherwise `false`.
|
|
682
|
+
*/
|
|
683
|
+
declaration?: "compatible" | "node16" | boolean;
|
|
684
|
+
dependencies: string[];
|
|
685
|
+
devDependencies: string[];
|
|
686
|
+
/**
|
|
687
|
+
* Build entries.
|
|
688
|
+
*/
|
|
689
|
+
entries: BuildEntry[];
|
|
690
|
+
/**
|
|
691
|
+
* Used to specify which modules or libraries should be considered
|
|
692
|
+
* external dependencies and not included in the final build product.
|
|
693
|
+
*/
|
|
694
|
+
externals: (RegExp | string)[];
|
|
695
|
+
/**
|
|
696
|
+
* Terminate the build process when a warning appears
|
|
697
|
+
*/
|
|
698
|
+
failOnWarn?: boolean;
|
|
699
|
+
/**
|
|
700
|
+
* Whether the current build is for a library.
|
|
701
|
+
*/
|
|
702
|
+
isLib: boolean;
|
|
703
|
+
/**
|
|
704
|
+
* The name of the project.
|
|
705
|
+
*/
|
|
706
|
+
name: string;
|
|
707
|
+
/**
|
|
708
|
+
* Output directory.
|
|
709
|
+
*/
|
|
710
|
+
outDir: string;
|
|
711
|
+
/**
|
|
712
|
+
* Run different types of builds (untyped, mkdist, Rollup, copy) simultaneously.
|
|
713
|
+
*/
|
|
714
|
+
parallel: boolean;
|
|
715
|
+
peerDependencies: string[];
|
|
716
|
+
/**
|
|
717
|
+
* Replace the text in the source code with rules.
|
|
718
|
+
*/
|
|
719
|
+
replace: Record<string, string>;
|
|
720
|
+
/**
|
|
721
|
+
* [Rollup](https://rollupjs.org/configuration-options) Build Options
|
|
722
|
+
*/
|
|
723
|
+
rollup: RollupBuildOptions;
|
|
724
|
+
/**
|
|
725
|
+
* The root directory of the project.
|
|
726
|
+
*/
|
|
727
|
+
rootDir: string;
|
|
728
|
+
/**
|
|
729
|
+
* Hide output logs during the build process.
|
|
730
|
+
* When true, suppresses non-essential console output.
|
|
731
|
+
*/
|
|
732
|
+
showOutLog?: boolean;
|
|
733
|
+
/**
|
|
734
|
+
* @experimental
|
|
735
|
+
* Generate source mapping file.
|
|
736
|
+
*/
|
|
737
|
+
transpileSourcemap: boolean;
|
|
738
|
+
/**
|
|
739
|
+
* Whether to build with JIT transpileStubs.
|
|
740
|
+
* Read more: [transpileStubbing](https://antfu.me/posts/publish-esm-and-cjs#transpileStubbing)
|
|
741
|
+
*/
|
|
742
|
+
transpileStub: boolean;
|
|
743
|
+
/**
|
|
744
|
+
* Stub options, where [jiti](https://github.com/unjs/jiti)
|
|
745
|
+
* is an object of type `Omit<JitiOptions, "transform" | "onError">`.
|
|
746
|
+
*/
|
|
747
|
+
transpileStubOptions: {
|
|
748
|
+
jiti: Omit<JitiOptions, "onError" | "transform">;
|
|
749
|
+
};
|
|
750
|
+
/**
|
|
751
|
+
* Whether to build and actively transpileWatch the file changes.
|
|
752
|
+
*
|
|
753
|
+
* @experimental This feature is experimental and incomplete.
|
|
754
|
+
*/
|
|
755
|
+
transpileWatch: boolean;
|
|
756
|
+
/**
|
|
757
|
+
* Watch mode options.
|
|
758
|
+
*/
|
|
759
|
+
transpileWatchOptions: undefined | WatcherOptions;
|
|
760
|
+
};
|
|
761
|
+
export type BuildPreset = (() => UnifiedBuildConfig) | UnifiedBuildConfig;
|
|
762
|
+
/**
|
|
763
|
+
* In addition to basic `entries`, `presets`, and `hooks`,
|
|
764
|
+
* there are also all the properties of `BuildOptions` except for BuildOptions's `entries`.
|
|
765
|
+
*/
|
|
766
|
+
export type UnifiedBuildConfig = DeepPartial<Omit<BuildOptions, "entries">> & {
|
|
767
|
+
/**
|
|
768
|
+
* Specify the entry file or entry module during the construction process.
|
|
769
|
+
*/
|
|
770
|
+
entries?: (BuildEntry | string)[];
|
|
771
|
+
/**
|
|
772
|
+
* Used to define hook functions during the construction process to perform custom operations during specific construction stages.
|
|
773
|
+
* This configuration allows you to insert custom logic during the build process to meet specific requirements or perform additional operations.
|
|
774
|
+
*/
|
|
775
|
+
hooks?: Partial<BuildHooks>;
|
|
776
|
+
/**
|
|
777
|
+
* Used to specify the preset build configuration.
|
|
778
|
+
*/
|
|
779
|
+
preset?: BuildPreset | string;
|
|
780
|
+
/**
|
|
781
|
+
* Used to create a stub for the build configuration.
|
|
782
|
+
* A stub is a simplified version of a mock object that is used to simulate the behavior of a real object.
|
|
783
|
+
* It is used to test the behavior of the object under test.
|
|
784
|
+
* @see https://turing.com/kb/stub-vs-mock#what-exactly-is-a-stub?
|
|
785
|
+
*/
|
|
786
|
+
stub?: boolean;
|
|
787
|
+
};
|
|
788
|
+
type DeepPartial<T> = {
|
|
789
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
790
|
+
};
|
|
791
|
+
export {};
|
package/bin/mod.d.ts
CHANGED
|
@@ -1,48 +1,2 @@
|
|
|
1
|
-
import type { BuildPublishConfig } from "./types.js";
|
|
2
|
-
export declare const defineConfig: (userConfig?: Partial<BuildPublishConfig>) =>
|
|
3
|
-
bumpDisable: boolean;
|
|
4
|
-
bumpFilter: string[];
|
|
5
|
-
bumpMode: import("./types.js").BumpMode;
|
|
6
|
-
commonPubPause: boolean;
|
|
7
|
-
commonPubRegistry: "jsr" | "npm" | "npm-jsr";
|
|
8
|
-
commonVerbose: boolean;
|
|
9
|
-
coreDeclarations: boolean;
|
|
10
|
-
coreEntryFile: string;
|
|
11
|
-
coreEntrySrcDir: string;
|
|
12
|
-
coreBuildOutDir: string;
|
|
13
|
-
coreIsCLI: {
|
|
14
|
-
enabled: boolean;
|
|
15
|
-
scripts: Record<string, string>;
|
|
16
|
-
};
|
|
17
|
-
coreDescription: string;
|
|
18
|
-
distJsrAllowDirty: boolean;
|
|
19
|
-
distJsrBuilder: import("./types.js").BundlerName;
|
|
20
|
-
distJsrCopyRootFiles: string[];
|
|
21
|
-
distJsrDirName: string;
|
|
22
|
-
distJsrDryRun: boolean;
|
|
23
|
-
distJsrFailOnWarn: boolean;
|
|
24
|
-
distJsrGenTsconfig: boolean;
|
|
25
|
-
distJsrOutFilesExt: import("./types.js").NpmOutExt;
|
|
26
|
-
distJsrSlowTypes: boolean;
|
|
27
|
-
distNpmBuilder: import("./types.js").BundlerName;
|
|
28
|
-
distNpmCopyRootFiles: string[];
|
|
29
|
-
distNpmDirName: string;
|
|
30
|
-
distNpmOutFilesExt: import("./types.js").NpmOutExt;
|
|
31
|
-
libsActMode: "libs-only" | "main-and-libs" | "main-project-only";
|
|
32
|
-
libsDirDist: string;
|
|
33
|
-
libsDirSrc: string;
|
|
34
|
-
libsList: Record<string, import("./types.js").LibConfig>;
|
|
35
|
-
logsFileName: string;
|
|
36
|
-
logsFreshFile: boolean;
|
|
37
|
-
rmDepsMode: import("./types.js").ExcludeMode;
|
|
38
|
-
rmDepsPatterns: string[];
|
|
39
|
-
transpileEsbuild: import("./types.js").Esbuild;
|
|
40
|
-
transpileFormat: import("./types.js").transpileFormat;
|
|
41
|
-
transpileMinify: boolean;
|
|
42
|
-
transpilePublicPath: string;
|
|
43
|
-
transpileSourcemap: import("./types.js").Sourcemap;
|
|
44
|
-
transpileSplitting: boolean;
|
|
45
|
-
transpileStub: boolean;
|
|
46
|
-
transpileTarget: import("./types.js").transpileTarget;
|
|
47
|
-
transpileWatch: boolean;
|
|
48
|
-
};
|
|
1
|
+
import type { BuildPublishConfig } from "./libs/sdk/sdk-types.js";
|
|
2
|
+
export declare const defineConfig: (userConfig?: Partial<BuildPublishConfig>) => any;
|
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
13
13
|
"@rollup/plugin-replace": "^6.0.2",
|
|
14
14
|
"@rollup/pluginutils": "^5.1.4",
|
|
15
|
+
"@types/semver": "^7.7.0",
|
|
15
16
|
"bun": "^1.2.14",
|
|
16
17
|
"chalk": "^5.4.1",
|
|
17
18
|
"defu": "^6.1.4",
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
"rollup": "^4.41.0",
|
|
33
34
|
"rollup-plugin-dts": "^6.2.1",
|
|
34
35
|
"scule": "^1.3.0",
|
|
36
|
+
"semver": "^7.7.2",
|
|
35
37
|
"tinyglobby": "^0.2.13",
|
|
36
38
|
"ts-morph": "^26.0.0",
|
|
37
39
|
"untyped": "^2.0.0"
|
|
@@ -41,7 +43,7 @@
|
|
|
41
43
|
"license": "MIT",
|
|
42
44
|
"name": "@reliverse/dler",
|
|
43
45
|
"type": "module",
|
|
44
|
-
"version": "1.4.
|
|
46
|
+
"version": "1.4.2",
|
|
45
47
|
"keywords": [
|
|
46
48
|
"reliverse",
|
|
47
49
|
"cli",
|
|
@@ -63,7 +65,6 @@
|
|
|
63
65
|
"devDependencies": {
|
|
64
66
|
"@biomejs/biome": "^1.9.4",
|
|
65
67
|
"@eslint/js": "^9.27.0",
|
|
66
|
-
"@reliverse/bleump": "^1.0.1",
|
|
67
68
|
"@stylistic/eslint-plugin": "^4.2.0",
|
|
68
69
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
69
70
|
"@types/bun": "^1.2.14",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { BaseBuildEntry, BuildContext } from "../types.js";
|
|
2
|
-
export type CopyBuildEntry = BaseBuildEntry & {
|
|
3
|
-
builder: "copy";
|
|
4
|
-
pattern?: string | string[];
|
|
5
|
-
};
|
|
6
|
-
export type CopyHooks = {
|
|
7
|
-
"copy:done": (ctx: BuildContext) => Promise<void> | void;
|
|
8
|
-
"copy:entries": (ctx: BuildContext, entries: CopyBuildEntry[]) => Promise<void> | void;
|
|
9
|
-
};
|
|
File without changes
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { MkdistOptions } from "mkdist";
|
|
2
|
-
import type { BaseBuildEntry, BuildContext } from "../types.js";
|
|
3
|
-
export type MkdistBuildEntry = _BaseAndMkdist & {
|
|
4
|
-
builder: "mkdist";
|
|
5
|
-
};
|
|
6
|
-
export type MkdistHooks = {
|
|
7
|
-
"mkdist:done": (ctx: BuildContext) => Promise<void> | void;
|
|
8
|
-
"mkdist:entries": (ctx: BuildContext, entries: MkdistBuildEntry[]) => Promise<void> | void;
|
|
9
|
-
"mkdist:entry:build": (ctx: BuildContext, entry: MkdistBuildEntry, output: {
|
|
10
|
-
writtenFiles: string[];
|
|
11
|
-
}) => Promise<void> | void;
|
|
12
|
-
"mkdist:entry:options": (ctx: BuildContext, entry: MkdistBuildEntry, options: MkdistOptions) => Promise<void> | void;
|
|
13
|
-
};
|
|
14
|
-
type _BaseAndMkdist = BaseBuildEntry & MkdistOptions;
|
|
15
|
-
export {};
|
|
File without changes
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import type { RollupAliasOptions } from "@rollup/plugin-alias";
|
|
2
|
-
import type { RollupCommonJSOptions } from "@rollup/plugin-commonjs";
|
|
3
|
-
import type { RollupJsonOptions } from "@rollup/plugin-json";
|
|
4
|
-
import type { RollupNodeResolveOptions } from "@rollup/plugin-node-resolve";
|
|
5
|
-
import type { RollupReplaceOptions } from "@rollup/plugin-replace";
|
|
6
|
-
import type { RollupOptions as _RollupOptions, OutputOptions, Plugin, RollupBuild } from "rollup";
|
|
7
|
-
import type { Options as RollupDtsOptions } from "rollup-plugin-dts";
|
|
8
|
-
import type { BaseBuildEntry, BuildContext } from "../types.js";
|
|
9
|
-
import type { EsbuildOptions } from "./plugins/esbuild.js";
|
|
10
|
-
export type RollupBuildEntry = BaseBuildEntry & {
|
|
11
|
-
builder: "rollup";
|
|
12
|
-
};
|
|
13
|
-
export type RollupBuildOptions = {
|
|
14
|
-
/**
|
|
15
|
-
* Alias plugin options
|
|
16
|
-
* Set to `false` to disable the plugin.
|
|
17
|
-
* Read more: [@rollup/plugin-alias](https://npmjs.com/package/@rollup/plugin-alias)
|
|
18
|
-
*/
|
|
19
|
-
alias: false | RollupAliasOptions;
|
|
20
|
-
/**
|
|
21
|
-
* If enabled, dler generates CommonJS polyfills for ESM builds.
|
|
22
|
-
*/
|
|
23
|
-
cjsBridge?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* CommonJS plugin options
|
|
26
|
-
* Set to `false` to disable the plugin.
|
|
27
|
-
* Read more: [@rollup/plugin-commonjs](https://npmjs.com/package/@rollup/plugin-commonjs)
|
|
28
|
-
*/
|
|
29
|
-
commonjs: false | RollupCommonJSOptions;
|
|
30
|
-
/**
|
|
31
|
-
* DTS plugin options
|
|
32
|
-
* Set to `false` to disable the plugin.
|
|
33
|
-
* Read more: [rollup-plugin-dts](https://npmjs.com/package/rollup-plugin-dts)
|
|
34
|
-
*/
|
|
35
|
-
dts: RollupDtsOptions;
|
|
36
|
-
/**
|
|
37
|
-
* If enabled, dler generates a CommonJS build in addition to the ESM build.
|
|
38
|
-
*/
|
|
39
|
-
emitCJS?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* ESBuild plugin options
|
|
42
|
-
* Set to `false` to disable the plugin.
|
|
43
|
-
* Read more: [transpileEsbuild](https://npmjs.com/package/transpileEsbuild)
|
|
44
|
-
*/
|
|
45
|
-
esbuild: EsbuildOptions | false;
|
|
46
|
-
/**
|
|
47
|
-
* Whether to inline dependencies not explicitly set in "dependencies" or "peerDependencies" or as marked externals to the bundle.
|
|
48
|
-
*
|
|
49
|
-
* If set to true, all such dependencies will be inlined.
|
|
50
|
-
* If an array of string or regular expressions is passed, these will be used to determine whether to inline such a dependency.
|
|
51
|
-
*/
|
|
52
|
-
inlineDependencies?: (RegExp | string)[] | boolean;
|
|
53
|
-
/**
|
|
54
|
-
* JSON plugin options
|
|
55
|
-
* Set to `false` to disable the plugin.
|
|
56
|
-
* Read more: [@rollup/plugin-json](https://npmjs.com/package/@rollup/plugin-json)
|
|
57
|
-
*/
|
|
58
|
-
json: false | RollupJsonOptions;
|
|
59
|
-
/**
|
|
60
|
-
* Rollup [Output Options](https://rollupjs.org/configuration-options)
|
|
61
|
-
*/
|
|
62
|
-
output?: OutputOptions;
|
|
63
|
-
/**
|
|
64
|
-
* Preserve dynamic imports as-is
|
|
65
|
-
*/
|
|
66
|
-
preserveDynamicImports?: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Replace plugin options
|
|
69
|
-
* Set to `false` to disable the plugin.
|
|
70
|
-
* Read more: [@rollup/plugin-replace](https://npmjs.com/package/@rollup/plugin-replace)
|
|
71
|
-
*/
|
|
72
|
-
replace: false | RollupReplaceOptions;
|
|
73
|
-
/**
|
|
74
|
-
* Resolve plugin options
|
|
75
|
-
* Set to `false` to disable the plugin.
|
|
76
|
-
* Read more: [@rollup/plugin-node-resolve](https://npmjs.com/package/@rollup/plugin-node-resolve)
|
|
77
|
-
*/
|
|
78
|
-
resolve: false | RollupNodeResolveOptions;
|
|
79
|
-
/**
|
|
80
|
-
* Enable experimental active watcher
|
|
81
|
-
*
|
|
82
|
-
* @experimental
|
|
83
|
-
*/
|
|
84
|
-
watch?: boolean;
|
|
85
|
-
};
|
|
86
|
-
export type RollupHooks = {
|
|
87
|
-
"rollup:build": (ctx: BuildContext, build: RollupBuild) => Promise<void> | void;
|
|
88
|
-
"rollup:done": (ctx: BuildContext) => Promise<void> | void;
|
|
89
|
-
"rollup:dts:build": (ctx: BuildContext, build: RollupBuild) => Promise<void> | void;
|
|
90
|
-
"rollup:dts:options": (ctx: BuildContext, options: RollupOptions) => Promise<void> | void;
|
|
91
|
-
"rollup:options": (ctx: BuildContext, options: RollupOptions) => Promise<void> | void;
|
|
92
|
-
};
|
|
93
|
-
export type RollupOptions = _RollupOptions & {
|
|
94
|
-
plugins: Plugin[];
|
|
95
|
-
};
|
|
File without changes
|