@powfix/core-js 0.23.7 → 0.23.9

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 (86) hide show
  1. package/dist/index.browser.d.ts +2 -2
  2. package/dist/index.browser.js +2 -2
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/index.node.d.ts +2 -2
  6. package/dist/index.node.js +2 -2
  7. package/dist/node/constants/index.d.ts +2 -2
  8. package/dist/node/constants/index.js +2 -2
  9. package/dist/node/index.d.ts +6 -6
  10. package/dist/node/index.js +6 -6
  11. package/dist/node/interfaces/db/index.d.ts +1 -1
  12. package/dist/node/interfaces/db/index.js +1 -1
  13. package/dist/node/interfaces/db/sequelize/Hook.d.ts +2 -2
  14. package/dist/node/interfaces/db/sequelize/HookFn.d.ts +1 -1
  15. package/dist/node/interfaces/db/sequelize/UpsertOptions.d.ts +2 -2
  16. package/dist/node/interfaces/db/sequelize/index.d.ts +6 -6
  17. package/dist/node/interfaces/db/sequelize/index.js +6 -6
  18. package/dist/node/interfaces/index.d.ts +1 -1
  19. package/dist/node/interfaces/index.js +1 -1
  20. package/dist/node/managers/TransactionManager.d.ts +2 -2
  21. package/dist/node/managers/TransactionManager.js +1 -1
  22. package/dist/node/managers/TransactionManager.types.d.ts +1 -1
  23. package/dist/node/managers/index.d.ts +2 -2
  24. package/dist/node/managers/index.js +2 -2
  25. package/dist/node/services/index.d.ts +1 -1
  26. package/dist/node/services/index.js +1 -1
  27. package/dist/node/services/redis/RedisPublisher.d.ts +1 -1
  28. package/dist/node/services/redis/RedisPublisher.js +1 -1
  29. package/dist/node/services/redis/RedisSubscriber.d.ts +2 -2
  30. package/dist/node/services/redis/RedisSubscriber.js +2 -2
  31. package/dist/node/services/redis/index.d.ts +3 -3
  32. package/dist/node/services/redis/index.js +3 -3
  33. package/dist/node/types/index.d.ts +2 -2
  34. package/dist/node/types/index.js +2 -2
  35. package/dist/node/types/mariaDb.d.ts +1 -1
  36. package/dist/node/utils/HookUtils.d.ts +1 -1
  37. package/dist/node/utils/index.d.ts +2 -2
  38. package/dist/node/utils/index.js +2 -2
  39. package/dist/node/utils/sequelize-utils/SequelizeUtils.cjs +13 -24
  40. package/dist/node/utils/sequelize-utils/SequelizeUtils.d.ts +1 -1
  41. package/dist/node/utils/sequelize-utils/SequelizeUtils.js +14 -25
  42. package/dist/node/utils/sequelize-utils/index.d.ts +2 -2
  43. package/dist/node/utils/sequelize-utils/index.js +2 -2
  44. package/dist/shared/constants/index.d.ts +6 -6
  45. package/dist/shared/constants/index.js +6 -6
  46. package/dist/shared/exports/Uint8Array.js +1 -1
  47. package/dist/shared/exports/atob.js +1 -1
  48. package/dist/shared/exports/btoa.js +1 -1
  49. package/dist/shared/index.d.ts +7 -7
  50. package/dist/shared/index.js +7 -7
  51. package/dist/shared/interfaces/Point3.d.ts +1 -1
  52. package/dist/shared/interfaces/index.d.ts +4 -4
  53. package/dist/shared/interfaces/index.js +4 -4
  54. package/dist/shared/managers/SessionManager.d.ts +2 -2
  55. package/dist/shared/managers/SessionManager.type.d.ts +1 -1
  56. package/dist/shared/managers/index.d.ts +2 -2
  57. package/dist/shared/managers/index.js +2 -2
  58. package/dist/shared/scripts/index.d.ts +1 -1
  59. package/dist/shared/scripts/index.js +1 -1
  60. package/dist/shared/services/index.d.ts +1 -1
  61. package/dist/shared/services/index.js +1 -1
  62. package/dist/shared/services/time/TimeService.d.ts +1 -1
  63. package/dist/shared/services/time/index.d.ts +2 -2
  64. package/dist/shared/services/time/index.js +2 -2
  65. package/dist/shared/types/index.d.ts +2 -2
  66. package/dist/shared/types/index.js +2 -2
  67. package/dist/shared/utils/ArrayUtils.js +1 -1
  68. package/dist/shared/utils/CoordinateUtils.d.ts +1 -1
  69. package/dist/shared/utils/DateUtils.d.ts +1 -1
  70. package/dist/shared/utils/DateUtils.js +1 -1
  71. package/dist/shared/utils/Enum.d.ts +1 -1
  72. package/dist/shared/utils/JuminNumberUtils.js +1 -1
  73. package/dist/shared/utils/ObjectIdUtils.js +1 -1
  74. package/dist/shared/utils/Point3Utils.d.ts +1 -1
  75. package/dist/shared/utils/UuidUtils.js +1 -1
  76. package/dist/shared/utils/global/base64.js +2 -2
  77. package/dist/shared/utils/global/fallbackIfNull.js +1 -1
  78. package/dist/shared/utils/global/fallbackIfUndefined.js +1 -1
  79. package/dist/shared/utils/global/index.d.ts +16 -16
  80. package/dist/shared/utils/global/index.js +16 -16
  81. package/dist/shared/utils/global/processFirstNonNullish.js +1 -1
  82. package/dist/shared/utils/index.d.ts +21 -21
  83. package/dist/shared/utils/index.js +21 -21
  84. package/dist/shared/utils/try-catch/index.d.ts +1 -1
  85. package/dist/shared/utils/try-catch/index.js +1 -1
  86. package/package.json +7 -6
@@ -1,2 +1,2 @@
1
- export * from './shared';
2
- export * from './browser';
1
+ export * from './shared/index.js';
2
+ export * from './browser/index.js';
@@ -1,2 +1,2 @@
1
- export * from './shared';
2
- export * from './browser';
1
+ export * from './shared/index.js';
2
+ export * from './browser/index.js';
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './shared';
1
+ export * from './shared/index.js';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export * from './shared';
1
+ export * from './shared/index.js';
@@ -1,2 +1,2 @@
1
- export * from './shared';
2
- export * from './node';
1
+ export * from './shared/index.js';
2
+ export * from './node/index.js';
@@ -1,2 +1,2 @@
1
- export * from './shared';
2
- export * from './node';
1
+ export * from './shared/index.js';
2
+ export * from './node/index.js';
@@ -1,2 +1,2 @@
1
- export * from './TransactionManagerLogLevel';
2
- export * from './TransactionManagerTimeoutAction';
1
+ export * from './TransactionManagerLogLevel.js';
2
+ export * from './TransactionManagerTimeoutAction.js';
@@ -1,2 +1,2 @@
1
- export * from './TransactionManagerLogLevel';
2
- export * from './TransactionManagerTimeoutAction';
1
+ export * from './TransactionManagerLogLevel.js';
2
+ export * from './TransactionManagerTimeoutAction.js';
@@ -1,6 +1,6 @@
1
- export * from './constants';
2
- export * from './interfaces';
3
- export * from './managers';
4
- export * from './services';
5
- export * from './types';
6
- export * from './utils';
1
+ export * from './constants/index.js';
2
+ export * from './interfaces/index.js';
3
+ export * from './managers/index.js';
4
+ export * from './services/index.js';
5
+ export * from './types/index.js';
6
+ export * from './utils/index.js';
@@ -1,6 +1,6 @@
1
- export * from './constants';
2
- export * from './interfaces';
3
- export * from './managers';
4
- export * from './services';
5
- export * from './types';
6
- export * from './utils';
1
+ export * from './constants/index.js';
2
+ export * from './interfaces/index.js';
3
+ export * from './managers/index.js';
4
+ export * from './services/index.js';
5
+ export * from './types/index.js';
6
+ export * from './utils/index.js';
@@ -1 +1 @@
1
- export * from './sequelize';
1
+ export * from './sequelize/index.js';
@@ -1 +1 @@
1
- export * from './sequelize';
1
+ export * from './sequelize/index.js';
@@ -1,6 +1,6 @@
1
1
  import { ModelCtor } from "sequelize-typescript";
2
- import { HookType } from "./HookType";
3
- import { HookFn } from "./HookFn";
2
+ import { HookType } from "./HookType.js";
3
+ import { HookFn } from "./HookFn.js";
4
4
  export interface Hook {
5
5
  model: ModelCtor;
6
6
  hookType: HookType;
@@ -1,4 +1,4 @@
1
1
  import { Hooks, SequelizeHooks } from "sequelize/types/hooks";
2
2
  import { Attributes, CreationAttributes } from "sequelize/types/model";
3
- import { HookType } from "./HookType";
3
+ import { HookType } from "./HookType.js";
4
4
  export type HookFn = SequelizeHooks<Hooks['_model'], Attributes<Hooks>, CreationAttributes<Hooks>>[HookType];
@@ -1,4 +1,4 @@
1
- import { ReloadOption } from "./ReloadOption";
2
- import { TransactionOption } from "./TransactionOption";
1
+ import { ReloadOption } from "./ReloadOption.js";
2
+ import { TransactionOption } from "./TransactionOption.js";
3
3
  export interface UpsertOptions extends ReloadOption, TransactionOption {
4
4
  }
@@ -1,6 +1,6 @@
1
- export * from './Hook';
2
- export * from './HookFn';
3
- export * from './HookType';
4
- export * from './ReloadOption';
5
- export * from './TransactionOption';
6
- export * from './UpsertOptions';
1
+ export * from './Hook.js';
2
+ export * from './HookFn.js';
3
+ export * from './HookType.js';
4
+ export * from './ReloadOption.js';
5
+ export * from './TransactionOption.js';
6
+ export * from './UpsertOptions.js';
@@ -1,6 +1,6 @@
1
- export * from './Hook';
2
- export * from './HookFn';
3
- export * from './HookType';
4
- export * from './ReloadOption';
5
- export * from './TransactionOption';
6
- export * from './UpsertOptions';
1
+ export * from './Hook.js';
2
+ export * from './HookFn.js';
3
+ export * from './HookType.js';
4
+ export * from './ReloadOption.js';
5
+ export * from './TransactionOption.js';
6
+ export * from './UpsertOptions.js';
@@ -1 +1 @@
1
- export * from './db';
1
+ export * from './db/index.js';
@@ -1 +1 @@
1
- export * from './db';
1
+ export * from './db/index.js';
@@ -1,7 +1,7 @@
1
1
  import { Transaction } from "sequelize";
2
2
  import EventEmitter from 'eventemitter3';
3
- import { TransactionManagerLogLevel, TransactionManagerTimeoutAction } from "../constants";
4
- import { TransactionManagerAddOption, TransactionManagerEventTypes } from "./TransactionManager.types";
3
+ import { TransactionManagerLogLevel, TransactionManagerTimeoutAction } from "../constants/index.js";
4
+ import { TransactionManagerAddOption, TransactionManagerEventTypes } from "./TransactionManager.types.js";
5
5
  export declare class TransactionManager {
6
6
  static DEFAULT_TIMEOUT: number;
7
7
  static DEFAULT_ACTION: TransactionManagerTimeoutAction;
@@ -185,7 +185,7 @@ function _ts_generator(thisArg, body) {
185
185
  }
186
186
  import { __publicField } from '../../chunk-PKBMQBKP.js';
187
187
  import EventEmitter from 'eventemitter3';
188
- import { TransactionManagerTimeoutAction, TransactionManagerLogLevel } from '../constants';
188
+ import { TransactionManagerTimeoutAction, TransactionManagerLogLevel } from '../constants/index.js';
189
189
  var LOG_TAG = "[TransactionManager]";
190
190
  var _TransactionManager = /*#__PURE__*/ function() {
191
191
  "use strict";
@@ -1,4 +1,4 @@
1
- import { TransactionManagerTimeoutAction } from "../constants";
1
+ import { TransactionManagerTimeoutAction } from "../constants/index.js";
2
2
  import { Transaction } from "sequelize";
3
3
  export interface TransactionManagerAddOption {
4
4
  timeout?: number;
@@ -1,2 +1,2 @@
1
- export * from './TransactionManager';
2
- export * from './TransactionManager.types';
1
+ export * from './TransactionManager.js';
2
+ export * from './TransactionManager.types.js';
@@ -1,2 +1,2 @@
1
- export * from './TransactionManager';
2
- export * from './TransactionManager.types';
1
+ export * from './TransactionManager.js';
2
+ export * from './TransactionManager.types.js';
@@ -1 +1 @@
1
- export * from './redis';
1
+ export * from './redis/index.js';
@@ -1 +1 @@
1
- export * from './redis';
1
+ export * from './redis/index.js';
@@ -1,4 +1,4 @@
1
- import { RedisClient } from "./RedisClient";
1
+ import { RedisClient } from "./RedisClient.js";
2
2
  export declare class RedisPublisher extends RedisClient {
3
3
  private logging;
4
4
  constructor(options?: RedisClient.RedisClientOptions);
@@ -215,7 +215,7 @@ function _ts_generator(thisArg, body) {
215
215
  }
216
216
  }
217
217
  import { __publicField } from '../../../chunk-PKBMQBKP.js';
218
- import { RedisClient } from './RedisClient';
218
+ import { RedisClient } from './RedisClient.js';
219
219
  var LOG_TAG = "[REDIS-PUB]";
220
220
  var RedisPublisher = /*#__PURE__*/ function(RedisClient) {
221
221
  "use strict";
@@ -1,5 +1,5 @@
1
- import { RedisClient } from "./RedisClient";
2
- import { PubSubListener } from "@redis/client/dist/lib/client/pub-sub";
1
+ import { RedisClient } from "./RedisClient.js";
2
+ import { PubSubListener } from "@redis/client/dist/lib/client/pub-sub.js";
3
3
  export declare class RedisSubscriber extends RedisClient {
4
4
  constructor(options?: RedisClient.RedisClientOptions);
5
5
  subscribe<T extends boolean = false>(channels: string | string[], listener: PubSubListener<T>, bufferMode?: T | undefined): Promise<void>;
@@ -215,8 +215,8 @@ function _ts_generator(thisArg, body) {
215
215
  }
216
216
  }
217
217
  import '../../../chunk-PKBMQBKP.js';
218
- import { RedisClient } from './RedisClient';
219
- import { castArray } from '../../../shared/utils';
218
+ import { RedisClient } from './RedisClient.js';
219
+ import { castArray } from '../../../shared/utils/index.js';
220
220
  var RedisSubscriber = /*#__PURE__*/ function(RedisClient) {
221
221
  "use strict";
222
222
  _inherits(RedisSubscriber, RedisClient);
@@ -1,3 +1,3 @@
1
- export * from './RedisClient';
2
- export * from './RedisPublisher';
3
- export * from './RedisSubscriber';
1
+ export * from './RedisClient.js';
2
+ export * from './RedisPublisher.js';
3
+ export * from './RedisSubscriber.js';
@@ -1,3 +1,3 @@
1
- export * from './RedisClient';
2
- export * from './RedisPublisher';
3
- export * from './RedisSubscriber';
1
+ export * from './RedisClient.js';
2
+ export * from './RedisPublisher.js';
3
+ export * from './RedisSubscriber.js';
@@ -1,2 +1,2 @@
1
- export * from './UpsertResult';
2
- export * from './mariaDb';
1
+ export * from './UpsertResult.js';
2
+ export * from './mariaDb.js';
@@ -1,2 +1,2 @@
1
- export * from './UpsertResult';
2
- export * from './mariaDb';
1
+ export * from './UpsertResult.js';
2
+ export * from './mariaDb.js';
@@ -1,4 +1,4 @@
1
- import type { TransactionManager, TransactionManagerAddOption } from "../managers";
1
+ import type { TransactionManager, TransactionManagerAddOption } from "../managers/index.js";
2
2
  import type { Sequelize } from "sequelize-typescript";
3
3
  import type { Transaction, TransactionOptions } from "sequelize";
4
4
  export interface MariaDbConnection {
@@ -1,4 +1,4 @@
1
- import { Hook, HookFn } from "../interfaces";
1
+ import { Hook, HookFn } from "../interfaces/index.js";
2
2
  import { ModelCtor } from "sequelize-typescript";
3
3
  export declare class HookUtils {
4
4
  static getFkChanges<T>(pFkValue: T | null | undefined, cFkValue: T | null | undefined): {
@@ -1,2 +1,2 @@
1
- export * from './sequelize-utils';
2
- export * from './HookUtils';
1
+ export * from './sequelize-utils/index.js';
2
+ export * from './HookUtils.js';
@@ -1,2 +1,2 @@
1
- export * from './sequelize-utils';
2
- export * from './HookUtils';
1
+ export * from './sequelize-utils/index.js';
2
+ export * from './HookUtils.js';
@@ -81,6 +81,7 @@ var chunkETV4XYOV_cjs = require('../../../chunk-ETV4XYOV.cjs');
81
81
  var sequelize = require('sequelize');
82
82
  var constants = require('../../../shared/constants');
83
83
  var node = require('@powfix/uuid/node');
84
+ var shared = require('../../../shared');
84
85
  var _SequelizeUtils = /*#__PURE__*/ function() {
85
86
  function _SequelizeUtils() {
86
87
  _class_call_check(this, _SequelizeUtils);
@@ -105,31 +106,19 @@ var _SequelizeUtils = /*#__PURE__*/ function() {
105
106
  var columnName = options.columnName, overrideOptions = _object_without_properties(options, [
106
107
  "columnName"
107
108
  ]);
108
- if (overrideOptions.allowNull) {
109
- return _object_spread({
110
- type: "binary(16)",
111
- get: function get() {
112
- var value = this.getDataValue(columnName);
113
- return value != null ? node.UUID.from(value) : value;
114
- },
115
- set: function set(input) {
116
- var value = input != null ? node.UUID.from(input).toBuffer() : input;
117
- this.setDataValue(columnName, value);
118
- }
119
- }, overrideOptions);
120
- } else {
121
- return _object_spread({
122
- type: "binary(16)",
123
- get: function get() {
124
- var value = this.getDataValue(columnName);
109
+ return _object_spread({
110
+ type: "binary(16)",
111
+ get: function get() {
112
+ return shared.mapIfNotNullish(this.getDataValue(columnName), function(value) {
125
113
  return node.UUID.from(value);
126
- },
127
- set: function set(input) {
128
- var value = node.UUID.from(input).toBuffer();
129
- this.setDataValue(columnName, value);
130
- }
131
- }, overrideOptions);
132
- }
114
+ });
115
+ },
116
+ set: function set(value) {
117
+ this.setDataValue(columnName, shared.mapIfNotNullish(value, function(e) {
118
+ return node.UUID.from(e).toBuffer();
119
+ }));
120
+ }
121
+ }, overrideOptions);
133
122
  }
134
123
  },
135
124
  {
@@ -1,5 +1,5 @@
1
1
  import { ModelAttributeColumnOptions, WhereOptions } from "sequelize";
2
- import { Model, NonKnownUuidStringKeys, UuidColumnOptionsBase, UuidColumnOptionsForModel } from "./types";
2
+ import { Model, NonKnownUuidStringKeys, UuidColumnOptionsBase, UuidColumnOptionsForModel } from "./types.js";
3
3
  export declare class SequelizeUtils {
4
4
  static decimal2Number(value: any): number | null | undefined;
5
5
  static buildPrimaryUuidColumn: () => Partial<ModelAttributeColumnOptions>;
@@ -78,8 +78,9 @@ function _type_of(obj) {
78
78
  }
79
79
  import { __publicField } from '../../../chunk-PKBMQBKP.js';
80
80
  import { Op } from 'sequelize';
81
- import { NOT_NULL } from '../../../shared/constants';
81
+ import { NOT_NULL } from '../../../shared/constants/index.js';
82
82
  import { UUID } from '@powfix/uuid/node';
83
+ import { mapIfNotNullish } from '../../../shared/index.js';
83
84
  var _SequelizeUtils = /*#__PURE__*/ function() {
84
85
  "use strict";
85
86
  function _SequelizeUtils() {
@@ -105,31 +106,19 @@ var _SequelizeUtils = /*#__PURE__*/ function() {
105
106
  var columnName = options.columnName, overrideOptions = _object_without_properties(options, [
106
107
  "columnName"
107
108
  ]);
108
- if (overrideOptions.allowNull) {
109
- return _object_spread({
110
- type: "binary(16)",
111
- get: function get() {
112
- var value = this.getDataValue(columnName);
113
- return value != null ? UUID.from(value) : value;
114
- },
115
- set: function set(input) {
116
- var value = input != null ? UUID.from(input).toBuffer() : input;
117
- this.setDataValue(columnName, value);
118
- }
119
- }, overrideOptions);
120
- } else {
121
- return _object_spread({
122
- type: "binary(16)",
123
- get: function get() {
124
- var value = this.getDataValue(columnName);
109
+ return _object_spread({
110
+ type: "binary(16)",
111
+ get: function get() {
112
+ return mapIfNotNullish(this.getDataValue(columnName), function(value) {
125
113
  return UUID.from(value);
126
- },
127
- set: function set(input) {
128
- var value = UUID.from(input).toBuffer();
129
- this.setDataValue(columnName, value);
130
- }
131
- }, overrideOptions);
132
- }
114
+ });
115
+ },
116
+ set: function set(value) {
117
+ this.setDataValue(columnName, mapIfNotNullish(value, function(e) {
118
+ return UUID.from(e).toBuffer();
119
+ }));
120
+ }
121
+ }, overrideOptions);
133
122
  }
134
123
  },
135
124
  {
@@ -1,2 +1,2 @@
1
- export * from './SequelizeUtils';
2
- export * from './types';
1
+ export * from './SequelizeUtils.js';
2
+ export * from './types.js';
@@ -1,2 +1,2 @@
1
- export * from './SequelizeUtils';
2
- export * from './types';
1
+ export * from './SequelizeUtils.js';
2
+ export * from './types.js';
@@ -1,6 +1,6 @@
1
- export * from './COORDINATE';
2
- export * from './CRUD';
3
- export * from './DATE';
4
- export * from './DISTANCE';
5
- export * from './DURATION';
6
- export * from './NOT_NULL';
1
+ export * from './COORDINATE.js';
2
+ export * from './CRUD.js';
3
+ export * from './DATE.js';
4
+ export * from './DISTANCE.js';
5
+ export * from './DURATION.js';
6
+ export * from './NOT_NULL.js';
@@ -1,6 +1,6 @@
1
- export * from './COORDINATE';
2
- export * from './CRUD';
3
- export * from './DATE';
4
- export * from './DISTANCE';
5
- export * from './DURATION';
6
- export * from './NOT_NULL';
1
+ export * from './COORDINATE.js';
2
+ export * from './CRUD.js';
3
+ export * from './DATE.js';
4
+ export * from './DISTANCE.js';
5
+ export * from './DURATION.js';
6
+ export * from './NOT_NULL.js';
@@ -1,5 +1,5 @@
1
1
  var _Uint8Array, _Uint8Array1;
2
- import { Uint8ArrayUtils } from '../utils';
2
+ import { Uint8ArrayUtils } from '../utils/index.js';
3
3
  if (!((_Uint8Array = Uint8Array) === null || _Uint8Array === void 0 ? void 0 : _Uint8Array.fromHex)) {
4
4
  Uint8Array.fromHex = Uint8ArrayUtils.fromHex;
5
5
  }
@@ -1,2 +1,2 @@
1
- import { atob } from '../utils';
1
+ import { atob } from '../utils/index.js';
2
2
  global.atob = atob;
@@ -1,2 +1,2 @@
1
- import { btoa } from '../utils';
1
+ import { btoa } from '../utils/index.js';
2
2
  global.btoa = btoa;
@@ -1,7 +1,7 @@
1
- export * from './constants';
2
- export * from './interfaces';
3
- export * from './managers';
4
- export * from './scripts';
5
- export * from './services';
6
- export * from './types';
7
- export * from './utils';
1
+ export * from './constants/index.js';
2
+ export * from './interfaces/index.js';
3
+ export * from './managers/index.js';
4
+ export * from './scripts/index.js';
5
+ export * from './services/index.js';
6
+ export * from './types/index.js';
7
+ export * from './utils/index.js';
@@ -1,7 +1,7 @@
1
- export * from './constants';
2
- export * from './interfaces';
3
- export * from './managers';
4
- export * from './scripts';
5
- export * from './services';
6
- export * from './types';
7
- export * from './utils';
1
+ export * from './constants/index.js';
2
+ export * from './interfaces/index.js';
3
+ export * from './managers/index.js';
4
+ export * from './scripts/index.js';
5
+ export * from './services/index.js';
6
+ export * from './types/index.js';
7
+ export * from './utils/index.js';
@@ -1,4 +1,4 @@
1
- import { Point2 } from "./Point2";
1
+ import { Point2 } from "./Point2.js";
2
2
  export interface Point3 extends Point2 {
3
3
  z: number;
4
4
  }
@@ -1,4 +1,4 @@
1
- export * from './Coordinate';
2
- export * from './Point2';
3
- export * from './Point3';
4
- export * from './StorageProvider';
1
+ export * from './Coordinate.js';
2
+ export * from './Point2.js';
3
+ export * from './Point3.js';
4
+ export * from './StorageProvider.js';
@@ -1,4 +1,4 @@
1
- export * from './Coordinate';
2
- export * from './Point2';
3
- export * from './Point3';
4
- export * from './StorageProvider';
1
+ export * from './Coordinate.js';
2
+ export * from './Point2.js';
3
+ export * from './Point3.js';
4
+ export * from './StorageProvider.js';
@@ -1,7 +1,7 @@
1
1
  import { AxiosInstance } from "axios";
2
- import { StorageProvider } from "../interfaces/StorageProvider";
2
+ import { StorageProvider } from "../interfaces/StorageProvider.js";
3
3
  import EventEmitter from 'eventemitter3';
4
- import { SessionManagerEvent, SessionManagerOptions } from "./SessionManager.type";
4
+ import { SessionManagerEvent, SessionManagerOptions } from "./SessionManager.type.js";
5
5
  export declare class SessionManager extends EventEmitter<SessionManagerEvent> {
6
6
  private static readonly DEFAULT_AUTHORIZATION_STORAGE_KEY;
7
7
  protected api: AxiosInstance;
@@ -1,5 +1,5 @@
1
1
  import { AxiosInstance } from "axios";
2
- import { StorageProvider } from "../interfaces/StorageProvider";
2
+ import { StorageProvider } from "../interfaces/StorageProvider.js";
3
3
  export interface SessionManagerOptions {
4
4
  api: AxiosInstance;
5
5
  storageProvider: StorageProvider;
@@ -1,2 +1,2 @@
1
- export * from './SessionManager';
2
- export * from './SessionManager.type';
1
+ export * from './SessionManager.js';
2
+ export * from './SessionManager.type.js';
@@ -1,2 +1,2 @@
1
- export * from './SessionManager';
2
- export * from './SessionManager.type';
1
+ export * from './SessionManager.js';
2
+ export * from './SessionManager.type.js';
@@ -1 +1 @@
1
- export * from './base64Polyfill';
1
+ export * from './base64Polyfill.js';
@@ -1 +1 @@
1
- export * from './base64Polyfill';
1
+ export * from './base64Polyfill.js';
@@ -1 +1 @@
1
- export * from './time';
1
+ export * from './time/index.js';
@@ -1 +1 @@
1
- export * from './time';
1
+ export * from './time/index.js';
@@ -1,5 +1,5 @@
1
1
  import EventEmitter from 'eventemitter3';
2
- import type { TimeServiceClientTimeProvider, TimeServiceEvent, TimeServiceNtpResult, TimeServiceOffset, TimeServiceOptions, TimeServiceServerTimeProvider, TimeServiceTimeStamp } from "./TimeService.type";
2
+ import type { TimeServiceClientTimeProvider, TimeServiceEvent, TimeServiceNtpResult, TimeServiceOffset, TimeServiceOptions, TimeServiceServerTimeProvider, TimeServiceTimeStamp } from "./TimeService.type.js";
3
3
  export declare class TimeService extends EventEmitter<TimeServiceEvent> {
4
4
  private syncHandler?;
5
5
  private offset?;
@@ -1,2 +1,2 @@
1
- export * from "./TimeService";
2
- export * from "./TimeService.type";
1
+ export * from "./TimeService.js";
2
+ export * from "./TimeService.type.js";
@@ -1,2 +1,2 @@
1
- export * from './TimeService';
2
- export * from './TimeService.type';
1
+ export * from './TimeService.js';
2
+ export * from './TimeService.type.js';
@@ -1,2 +1,2 @@
1
- export * from './IntRage';
2
- export * from './PartialExcept';
1
+ export * from './IntRage.js';
2
+ export * from './PartialExcept.js';
@@ -1,2 +1,2 @@
1
- export * from './IntRage';
2
- export * from './PartialExcept';
1
+ export * from './IntRage.js';
2
+ export * from './PartialExcept.js';
@@ -43,7 +43,7 @@ function _unsupported_iterable_to_array(o, minLen) {
43
43
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
44
44
  }
45
45
  import '../../chunk-PKBMQBKP.js';
46
- import { castArray } from './global';
46
+ import { castArray } from './global/index.js';
47
47
  var ArrayUtils = /*#__PURE__*/ function() {
48
48
  "use strict";
49
49
  function ArrayUtils() {
@@ -1,4 +1,4 @@
1
- import { Coordinate } from "../interfaces/Coordinate";
1
+ import { Coordinate } from "../interfaces/Coordinate.js";
2
2
  export declare class CoordinateUtils {
3
3
  static isValidLatitude(latitude: Coordinate['latitude'] | string): boolean;
4
4
  static isValidLongitude(longitude: Coordinate['longitude'] | string): boolean;
@@ -1,5 +1,5 @@
1
1
  import { MomentInput, RelativeTimeSpec } from "moment";
2
- import { DATE } from "../constants/DATE";
2
+ import { DATE } from "../constants/DATE.js";
3
3
  export declare class DateUtils {
4
4
  static isPositiveInteger(value: unknown, strict?: boolean): boolean;
5
5
  static isMilliseconds(value: unknown, strict?: boolean): boolean;
@@ -30,7 +30,7 @@ function _type_of(obj) {
30
30
  }
31
31
  import { __publicField } from '../../chunk-PKBMQBKP.js';
32
32
  import moment from 'moment';
33
- import { DATE } from '../constants/DATE';
33
+ import { DATE } from '../constants/DATE.js';
34
34
  var _DateUtils = /*#__PURE__*/ function() {
35
35
  "use strict";
36
36
  function _DateUtils() {
@@ -1,4 +1,4 @@
1
- import type { EnumEntries } from "./Enum.types";
1
+ import type { EnumEntries } from "./Enum.types.js";
2
2
  export declare class Enum<E extends object> {
3
3
  static entries<E extends object>(e: E): EnumEntries<E>;
4
4
  static keys<E extends object>(e: E): ({ [K in keyof E]: E[K] extends Function ? never : K; }[keyof E] extends infer R ? R extends never ? never : R : never)[];
@@ -18,7 +18,7 @@ function _create_class(Constructor, protoProps, staticProps) {
18
18
  return Constructor;
19
19
  }
20
20
  import '../../chunk-PKBMQBKP.js';
21
- import { between } from './global/between';
21
+ import { between } from './global/between.js';
22
22
  var JuminNumberUtils = /*#__PURE__*/ function() {
23
23
  "use strict";
24
24
  function JuminNumberUtils() {
@@ -18,7 +18,7 @@ function _create_class(Constructor, protoProps, staticProps) {
18
18
  return Constructor;
19
19
  }
20
20
  import '../../chunk-PKBMQBKP.js';
21
- import { Uint8ArrayUtils } from './Uint8ArrayUtils';
21
+ import { Uint8ArrayUtils } from './Uint8ArrayUtils.js';
22
22
  import { UUID } from '@powfix/uuid/node';
23
23
  var ObjectIdUtils = /*#__PURE__*/ function() {
24
24
  "use strict";
@@ -1,4 +1,4 @@
1
- import { Point3 } from "../interfaces/Point3";
1
+ import { Point3 } from "../interfaces/Point3.js";
2
2
  export declare class Point3Utils {
3
3
  static distance(p1: Point3, p2: Point3): number;
4
4
  }
@@ -19,7 +19,7 @@ function _create_class(Constructor, protoProps, staticProps) {
19
19
  }
20
20
  import '../../chunk-PKBMQBKP.js';
21
21
  import * as uuid from 'uuid';
22
- import { Uint8ArrayUtils } from './Uint8ArrayUtils';
22
+ import { Uint8ArrayUtils } from './Uint8ArrayUtils.js';
23
23
  var UuidUtils = /*#__PURE__*/ function() {
24
24
  "use strict";
25
25
  function UuidUtils() {
@@ -1,6 +1,6 @@
1
1
  import '../../../chunk-PKBMQBKP.js';
2
- import { btoa } from './btoa';
3
- import { atob } from './atob';
2
+ import { btoa } from './btoa.js';
3
+ import { atob } from './atob.js';
4
4
  function encodeBase64(str) {
5
5
  var encoder = new TextEncoder();
6
6
  var bytes = encoder.encode(str);
@@ -1,5 +1,5 @@
1
1
  import '../../../chunk-PKBMQBKP.js';
2
- import { fallbackIfMatch } from './fallbackIfMatch';
2
+ import { fallbackIfMatch } from './fallbackIfMatch.js';
3
3
  function fallbackIfNull(value, fallback) {
4
4
  return fallbackIfMatch(value, null, fallback);
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import '../../../chunk-PKBMQBKP.js';
2
- import { fallbackIfMatch } from './fallbackIfMatch';
2
+ import { fallbackIfMatch } from './fallbackIfMatch.js';
3
3
  function fallbackIfUndefined(value, fallback) {
4
4
  return fallbackIfMatch(value, void 0, fallback);
5
5
  }
@@ -1,16 +1,16 @@
1
- export * from './atob';
2
- export * from './base64';
3
- export * from './between';
4
- export * from './btoa';
5
- export * from './castArray';
6
- export * from './circularDistance';
7
- export * from './sleep';
8
- export * from './fallbackIfMatch';
9
- export * from './fallbackIfNull';
10
- export * from './fallbackIfNullish';
11
- export * from './fallbackIfUndefined';
12
- export * from './firstNonNullish';
13
- export * from './flat';
14
- export * from './mapIfNotNullish';
15
- export * from './processFirstNonNullish';
16
- export * from './pureEnum';
1
+ export * from './atob.js';
2
+ export * from './base64.js';
3
+ export * from './between.js';
4
+ export * from './btoa.js';
5
+ export * from './castArray.js';
6
+ export * from './circularDistance.js';
7
+ export * from './sleep.js';
8
+ export * from './fallbackIfMatch.js';
9
+ export * from './fallbackIfNull.js';
10
+ export * from './fallbackIfNullish.js';
11
+ export * from './fallbackIfUndefined.js';
12
+ export * from './firstNonNullish.js';
13
+ export * from './flat.js';
14
+ export * from './mapIfNotNullish.js';
15
+ export * from './processFirstNonNullish.js';
16
+ export * from './pureEnum.js';
@@ -1,16 +1,16 @@
1
- export * from './atob';
2
- export * from './base64';
3
- export * from './between';
4
- export * from './btoa';
5
- export * from './castArray';
6
- export * from './circularDistance';
7
- export * from './sleep';
8
- export * from './fallbackIfMatch';
9
- export * from './fallbackIfNull';
10
- export * from './fallbackIfNullish';
11
- export * from './fallbackIfUndefined';
12
- export * from './firstNonNullish';
13
- export * from './flat';
14
- export * from './mapIfNotNullish';
15
- export * from './processFirstNonNullish';
16
- export * from './pureEnum';
1
+ export * from './atob.js';
2
+ export * from './base64.js';
3
+ export * from './between.js';
4
+ export * from './btoa.js';
5
+ export * from './castArray.js';
6
+ export * from './circularDistance.js';
7
+ export * from './sleep.js';
8
+ export * from './fallbackIfMatch.js';
9
+ export * from './fallbackIfNull.js';
10
+ export * from './fallbackIfNullish.js';
11
+ export * from './fallbackIfUndefined.js';
12
+ export * from './firstNonNullish.js';
13
+ export * from './flat.js';
14
+ export * from './mapIfNotNullish.js';
15
+ export * from './processFirstNonNullish.js';
16
+ export * from './pureEnum.js';
@@ -24,7 +24,7 @@ function _unsupported_iterable_to_array(o, minLen) {
24
24
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
25
25
  }
26
26
  import '../../../chunk-PKBMQBKP.js';
27
- import { firstNonNullish } from './firstNonNullish';
27
+ import { firstNonNullish } from './firstNonNullish.js';
28
28
  function processFirstNonNullish(processor) {
29
29
  for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
30
30
  args[_key - 1] = arguments[_key];
@@ -1,21 +1,21 @@
1
- export * from './global';
2
- export * from './ArrayUtils';
3
- export * from './AxiosUtils';
4
- export * from './StringUtils';
5
- export * from './Uint8ArrayUtils';
6
- export * from './UuidUtils';
7
- export * from './BooleanUtils';
8
- export * from './Calc';
9
- export * from './CoordinateUtils';
10
- export * from './DateUtils';
11
- export * from './Enum';
12
- export * from './Enum.types';
13
- export * from './I18nUtils';
14
- export * from './NumberUtils';
15
- export * from './ObjectIdUtils';
16
- export * from './Point3Utils';
17
- export * from './RandomUtils';
18
- export * from './Validator';
19
- export * from './JuminNumberUtils';
20
- export * from './Sequencer';
21
- export * from './try-catch';
1
+ export * from './global/index.js';
2
+ export * from './ArrayUtils.js';
3
+ export * from './AxiosUtils.js';
4
+ export * from './StringUtils.js';
5
+ export * from './Uint8ArrayUtils.js';
6
+ export * from './UuidUtils.js';
7
+ export * from './BooleanUtils.js';
8
+ export * from './Calc.js';
9
+ export * from './CoordinateUtils.js';
10
+ export * from './DateUtils.js';
11
+ export * from './Enum.js';
12
+ export * from './Enum.types.js';
13
+ export * from './I18nUtils.js';
14
+ export * from './NumberUtils.js';
15
+ export * from './ObjectIdUtils.js';
16
+ export * from './Point3Utils.js';
17
+ export * from './RandomUtils.js';
18
+ export * from './Validator.js';
19
+ export * from './JuminNumberUtils.js';
20
+ export * from './Sequencer.js';
21
+ export * from './try-catch/index.js';
@@ -1,21 +1,21 @@
1
- export * from './global';
2
- export * from './ArrayUtils';
3
- export * from './AxiosUtils';
4
- export * from './StringUtils';
5
- export * from './Uint8ArrayUtils';
6
- export * from './UuidUtils';
7
- export * from './BooleanUtils';
8
- export * from './Calc';
9
- export * from './CoordinateUtils';
10
- export * from './DateUtils';
11
- export * from './Enum';
12
- export * from './Enum.types';
13
- export * from './I18nUtils';
14
- export * from './NumberUtils';
15
- export * from './ObjectIdUtils';
16
- export * from './Point3Utils';
17
- export * from './RandomUtils';
18
- export * from './Validator';
19
- export * from './JuminNumberUtils';
20
- export * from './Sequencer';
21
- export * from './try-catch';
1
+ export * from './global/index.js';
2
+ export * from './ArrayUtils.js';
3
+ export * from './AxiosUtils.js';
4
+ export * from './StringUtils.js';
5
+ export * from './Uint8ArrayUtils.js';
6
+ export * from './UuidUtils.js';
7
+ export * from './BooleanUtils.js';
8
+ export * from './Calc.js';
9
+ export * from './CoordinateUtils.js';
10
+ export * from './DateUtils.js';
11
+ export * from './Enum.js';
12
+ export * from './Enum.types.js';
13
+ export * from './I18nUtils.js';
14
+ export * from './NumberUtils.js';
15
+ export * from './ObjectIdUtils.js';
16
+ export * from './Point3Utils.js';
17
+ export * from './RandomUtils.js';
18
+ export * from './Validator.js';
19
+ export * from './JuminNumberUtils.js';
20
+ export * from './Sequencer.js';
21
+ export * from './try-catch/index.js';
@@ -1 +1 @@
1
- export * from "./TryCatch";
1
+ export * from "./TryCatch.js";
@@ -1 +1 @@
1
- export * from './TryCatch';
1
+ export * from './TryCatch.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powfix/core-js",
3
- "version": "0.23.7",
3
+ "version": "0.23.9",
4
4
  "description": "core package",
5
5
  "author": "Kwon Kyung-Min <powfix@gmail.com>",
6
6
  "private": false,
@@ -21,12 +21,13 @@
21
21
  "types": "./dist/index.d.ts",
22
22
  "scripts": {
23
23
  "clean": "rm -rf dist | wc -l",
24
- "esmfix": "tsc-esm-fix --ext='.mjs'",
24
+ "esmfix": "tsc-esm-fix --ext='.js' dist/**/*.js",
25
25
  "compile": "tsc",
26
+ "bundle": "tsup --config tsup.config.ts",
26
27
  "prebuild": "yarn clean",
27
- "build": "yarn compile && yarn build:tsup && yarn build:dts",
28
- "build:tsup": "tsup --config tsup.config.ts",
29
- "build:dts": "tsc -p tsconfig.declaration.json"
28
+ "build": "yarn compile && yarn bundle && yarn build:dts",
29
+ "build:dts": "tsc -p tsconfig.declaration.json",
30
+ "postbuild": "yarn esmfix"
30
31
  },
31
32
  "files": [
32
33
  "dist",
@@ -61,7 +62,7 @@
61
62
  "uuid": "9.0.1"
62
63
  },
63
64
  "devDependencies": {
64
- "@powfix/uuid": "^0.2.7",
65
+ "@powfix/uuid": "^0.2.12",
65
66
  "@swc/core": "^1.13.5",
66
67
  "@types/base-64": "1.0.2",
67
68
  "@types/node": "^24.5.1",