@adaas/a-utils 0.1.19 → 0.1.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaas/a-utils",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "description": "A-Utils is a set of utilities that are used across the ADAAS ecosystem. This package is designed to be a collection of utilities that are used across the ADAAS ecosystem.",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.cjs",
package/src/index.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  // A-Channel Components
4
4
  // ============================================================================
5
5
  export { A_Channel } from './lib/A-Channel/A-Channel.component';
6
+ export { A_ChannelRequest } from './lib/A-Channel/A-ChannelRequest.context';
6
7
  export { A_ChannelError } from './lib/A-Channel/A-Channel.error';
7
8
  export * from './lib/A-Channel/A-Channel.types';
8
9
  export * from './lib/A-Channel/A-Channel.constants';
@@ -34,7 +35,10 @@ export * from './lib/A-Config/A-Config.constants';
34
35
  // A-Logger Components
35
36
  // ============================================================================
36
37
  export { A_Logger } from './lib/A-Logger/A-Logger.component';
37
- // export * from './src/lib/A-Logger/A-Logger.types'; // Empty file
38
+ export * from './lib/A-Logger/A-Logger.types';
39
+ export * from './lib/A-Logger/A-Logger.constants';
40
+ export * from './lib/A-Logger/A-Logger.env';
41
+
38
42
 
39
43
 
40
44
  // ============================================================================
@@ -50,7 +54,16 @@ export * from './lib/A-Manifest/A-Manifest.types';
50
54
  // A-Memory Components
51
55
  // ============================================================================
52
56
  export { A_Memory } from './lib/A-Memory/A-Memory.component';
57
+ export { A_MemoryContext } from './lib/A-Memory/A-Memory.context';
58
+ export { A_MemoryError } from './lib/A-Memory/A-Memory.error';
59
+ export * from './lib/A-Memory/A-Memory.constants';
60
+ export * from './lib/A-Memory/A-Memory.types';
53
61
 
62
+ // ============================================================================
63
+ // A-Operation Components
64
+ // ============================================================================
65
+ export { A_OperationContext } from './lib/A-Operation/A-Operation.context';
66
+ export * from './lib/A-Operation/A-Operation.types';
54
67
 
55
68
  // ============================================================================
56
69
  // A-Polyfill Components
@@ -68,4 +81,11 @@ export { A_Deferred } from './lib/A-Schedule/A-Deferred.class';
68
81
  export * from './lib/A-Schedule/A-Schedule.types';
69
82
 
70
83
 
71
-
84
+ // ============================================================================
85
+ // A-State Machine Components
86
+ // ============================================================================
87
+ export { A_StateMachine } from './lib/A-StateMachine/A-StateMachine.component';
88
+ export { A_StateMachineTransition } from './lib/A-StateMachine/A-StateMachineTransition.context';
89
+ export { A_StateMachineError } from './lib/A-StateMachine/A-StateMachine.error';
90
+ export * from './lib/A-StateMachine/A-StateMachine.types';
91
+ export * from './lib/A-StateMachine/A-StateMachine.constants';
package/tsup.config.ts CHANGED
@@ -1,15 +1,32 @@
1
1
  import { defineConfig } from "tsup";
2
2
 
3
- export default defineConfig({
4
- entry: ["src/index.ts"], // 👈 adjust if your main file is elsewhere
5
- format: ["esm", "cjs"], // both Node (CJS) and ESM builds
6
- dts: true, // generate declaration files
7
- sourcemap: true, // helpful for debugging
8
- clean: true, // clear dist/ before build
9
- target: "es2020", // good for both Node 18+ and browsers
10
- treeshake: true, // ✅ enable tree-shaking
11
- skipNodeModulesBundle: true, // do NOT bundle node_modules (leave them external)
12
- splitting: false, // one file per format (simpler)
13
- minify: false, // optional: turn on if you want smaller bundle
14
- platform: "neutral", // 👈 important: works in Node & browser
15
- });
3
+ export default defineConfig((options) => ({
4
+ entry: ["src/index.ts"],
5
+ format: ["esm", "cjs"],
6
+ dts: true,
7
+ clean: !options.watch,
8
+ sourcemap: true,
9
+ target: "es2020",
10
+ minify: !options.watch,
11
+ treeshake: "recommended",
12
+ skipNodeModulesBundle: true,
13
+ splitting: false,
14
+ silent: false,
15
+ platform: "neutral",
16
+ // Add hash to filenames for cache busting in production builds
17
+ outExtension({ format }) {
18
+ return {
19
+ js: format === "esm" ? `.mjs` : `.cjs`,
20
+ };
21
+ },
22
+ // Extra optimization options (for 2025 esbuild)
23
+ esbuildOptions(options) {
24
+ options.keepNames = true; // Preserve class/function names for better debugging
25
+ options.charset = "utf8";
26
+ },
27
+
28
+ // Enable minification for output size (production only)
29
+ minifyWhitespace: !options.watch,
30
+ minifyIdentifiers: !options.watch,
31
+ minifySyntax: !options.watch,
32
+ }));