@visulima/packem 1.18.2 → 1.18.4

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 (64) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +39 -0
  3. package/dist/cli/index.mjs +187 -0
  4. package/dist/config/index.cjs +1 -1
  5. package/dist/config/index.d.cts +2 -13
  6. package/dist/config/index.d.mts +2 -13
  7. package/dist/config/index.d.ts +2 -13
  8. package/dist/config/index.mjs +1 -1
  9. package/dist/config/utils/load-package-json.d.cts +8 -0
  10. package/dist/{utils → config/utils}/load-package-json.d.mts +2 -2
  11. package/dist/config/utils/load-package-json.d.ts +8 -0
  12. package/dist/config/utils/load-packem-config.d.mts +7 -0
  13. package/dist/config/utils/load-preset.d.mts +4 -0
  14. package/dist/config/utils/load-tsconfig.d.cts +7 -0
  15. package/dist/config/utils/load-tsconfig.d.mts +5 -0
  16. package/dist/config/utils/load-tsconfig.d.ts +7 -0
  17. package/dist/index.cjs +125 -0
  18. package/dist/index.d.cts +53 -0
  19. package/dist/index.d.mts +53 -0
  20. package/dist/index.d.ts +53 -0
  21. package/dist/index.mjs +131 -0
  22. package/dist/packem/index.d.cts +1 -6
  23. package/dist/packem/index.d.mts +1 -6
  24. package/dist/packem/index.d.ts +1 -6
  25. package/dist/packem_shared/constants-CR0qfKZx.cjs +1 -0
  26. package/dist/packem_shared/{constants-DSQIKVQe.mjs → constants-CwJdgxph.mjs} +1 -1
  27. package/dist/rollup/plugins/esbuild/index.cjs +1 -1
  28. package/dist/rollup/plugins/esbuild/index.mjs +1 -1
  29. package/dist/rollup/plugins/oxc/oxc-transformer.cjs +1 -1
  30. package/dist/rollup/plugins/oxc/oxc-transformer.mjs +2 -2
  31. package/dist/rollup/plugins/sucrase/index.cjs +1 -1
  32. package/dist/rollup/plugins/sucrase/index.mjs +1 -1
  33. package/dist/rollup/plugins/swc/swc-plugin.cjs +1 -1
  34. package/dist/rollup/plugins/swc/swc-plugin.mjs +1 -1
  35. package/dist/types.d.cts +12 -1
  36. package/dist/types.d.mts +12 -1
  37. package/dist/types.d.ts +12 -1
  38. package/package.json +10 -10
  39. package/dist/cli.mjs +0 -187
  40. package/dist/hooks/preset/auto.d.cts +0 -5
  41. package/dist/hooks/preset/auto.d.ts +0 -5
  42. package/dist/hooks/preset/utils/infer-entries.d.cts +0 -14
  43. package/dist/hooks/preset/utils/infer-entries.d.ts +0 -14
  44. package/dist/hooks/preset/utils/overwrite-with-publish-config.d.cts +0 -6
  45. package/dist/hooks/preset/utils/overwrite-with-publish-config.d.ts +0 -6
  46. package/dist/hooks/preset/utils/resolve-preset.d.cts +0 -6
  47. package/dist/hooks/preset/utils/resolve-preset.d.mts +0 -4
  48. package/dist/hooks/preset/utils/resolve-preset.d.ts +0 -6
  49. package/dist/packem/index.cjs +0 -125
  50. package/dist/packem/index.mjs +0 -131
  51. package/dist/packem_shared/constants-C98jAkyM.cjs +0 -1
  52. package/dist/utils/find-packem-file.d.cts +0 -4
  53. package/dist/utils/find-packem-file.d.ts +0 -4
  54. package/dist/utils/load-package-json.d.cts +0 -8
  55. package/dist/utils/load-package-json.d.ts +0 -8
  56. /package/dist/{commands → cli/commands}/add.d.mts +0 -0
  57. /package/dist/{commands → cli/commands}/build.d.mts +0 -0
  58. /package/dist/{commands → cli/commands}/init.d.mts +0 -0
  59. /package/dist/{commands → cli/commands}/utils/css-loader-dependencies.d.mts +0 -0
  60. /package/dist/{cli.d.mts → cli/index.d.mts} +0 -0
  61. /package/dist/{hooks → config}/preset/auto.d.mts +0 -0
  62. /package/dist/{hooks → config}/preset/utils/infer-entries.d.mts +0 -0
  63. /package/dist/{hooks → config}/preset/utils/overwrite-with-publish-config.d.mts +0 -0
  64. /package/dist/{utils → config/utils}/find-packem-file.d.mts +0 -0
@@ -0,0 +1,53 @@
1
+ import type { ConstructorOptions } from "@visulima/pail";
2
+ import type { BuildConfig, Environment, Mode } from "./types.d.mts";
3
+ /**
4
+ * Configuration options for Packem bundler
5
+ *
6
+ * @interface PackemOptions
7
+ * @extends {BuildConfig}
8
+ */
9
+ export interface PackemOptions extends BuildConfig {
10
+ /**
11
+ * The environment to build for
12
+ * Determines the build environment configuration
13
+ *
14
+ * @default "production"
15
+ * @type {Environment}
16
+ * @memberof PackemOptions
17
+ */
18
+ environment?: Environment;
19
+ /**
20
+ * Logger configuration options
21
+ * Used to customize the logging behavior and output format
22
+ *
23
+ * @type {ConstructorOptions<string, string>}
24
+ * @memberof PackemOptions
25
+ */
26
+ logger?: ConstructorOptions<string, string>;
27
+ /**
28
+ * The mode to run Packem in
29
+ * Controls how the bundler processes and optimizes the code
30
+ *
31
+ * @default "build"
32
+ * @type {Mode}
33
+ * @memberof PackemOptions
34
+ */
35
+ mode?: Mode;
36
+ }
37
+ /**
38
+ * Runs the Packem bundler with the specified options
39
+ *
40
+ * @param rootDirectory - The root directory of the project to bundle
41
+ * @param options - Configuration options for the bundler
42
+ * @returns Promise that resolves with the build result
43
+ *
44
+ * @example
45
+ * ```typescript
46
+ * const result = await packem("./src", {
47
+ * mode: "build",
48
+ * environment: "production"
49
+ * });
50
+ * ```
51
+ */
52
+ export declare const packem: (rootDirectory: string, options?: PackemOptions) => Promise<void>;
53
+ export type { BuildContext, BuildContextBuildAssetAndChunk, BuildContextBuildEntry, BuildEntry, BuildHooks, BuildOptions, Environment, Mode, RollupBuildOptions, Runtime, TransformerName, TransformerFn, IsolatedDeclarationsTransformer, } from "./types.d.mts";
@@ -0,0 +1,53 @@
1
+ import type { ConstructorOptions } from "@visulima/pail";
2
+ import type { BuildConfig, Environment, Mode } from "./types.d.ts";
3
+ /**
4
+ * Configuration options for Packem bundler
5
+ *
6
+ * @interface PackemOptions
7
+ * @extends {BuildConfig}
8
+ */
9
+ export interface PackemOptions extends BuildConfig {
10
+ /**
11
+ * The environment to build for
12
+ * Determines the build environment configuration
13
+ *
14
+ * @default "production"
15
+ * @type {Environment}
16
+ * @memberof PackemOptions
17
+ */
18
+ environment?: Environment;
19
+ /**
20
+ * Logger configuration options
21
+ * Used to customize the logging behavior and output format
22
+ *
23
+ * @type {ConstructorOptions<string, string>}
24
+ * @memberof PackemOptions
25
+ */
26
+ logger?: ConstructorOptions<string, string>;
27
+ /**
28
+ * The mode to run Packem in
29
+ * Controls how the bundler processes and optimizes the code
30
+ *
31
+ * @default "build"
32
+ * @type {Mode}
33
+ * @memberof PackemOptions
34
+ */
35
+ mode?: Mode;
36
+ }
37
+ /**
38
+ * Runs the Packem bundler with the specified options
39
+ *
40
+ * @param rootDirectory - The root directory of the project to bundle
41
+ * @param options - Configuration options for the bundler
42
+ * @returns Promise that resolves with the build result
43
+ *
44
+ * @example
45
+ * ```typescript
46
+ * const result = await packem("./src", {
47
+ * mode: "build",
48
+ * environment: "production"
49
+ * });
50
+ * ```
51
+ */
52
+ export declare const packem: (rootDirectory: string, options?: PackemOptions) => Promise<void>;
53
+ export type { BuildContext, BuildContextBuildAssetAndChunk, BuildContextBuildEntry, BuildEntry, BuildHooks, BuildOptions, Environment, Mode, RollupBuildOptions, Runtime, TransformerName, TransformerFn, IsolatedDeclarationsTransformer, } from "./types.d.ts";