@awesomeness-js/utils 1.0.22 → 1.0.23

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/index.js CHANGED
@@ -1,65 +1,65 @@
1
- /**
2
- * This file is auto-generated by the build script.
3
- * It consolidates API functions for use in the application.
4
- * Do not edit manually.
5
- */
6
- import _build from './src/build.js';
7
- import _clean_array from './src/clean/array.js';
8
- import _clean_boolean from './src/clean/boolean.js';
9
- import _clean_integer from './src/clean/integer.js';
10
- import _clean_number from './src/clean/number.js';
11
- import _clean_object from './src/clean/object.js';
12
- import _clean_string from './src/clean/string.js';
13
- import _clean_timestamp from './src/clean/timestamp.js';
14
- import _clean_uuid from './src/clean/uuid.js';
15
- import _combineFiles from './src/combineFiles.js';
16
- import _convertBytes from './src/convertBytes.js';
17
- import _decrypt from './src/decrypt.js';
18
- import _each from './src/each.js';
19
- import _eachAsync from './src/eachAsync.js';
20
- import _encrypt from './src/encrypt.js';
21
- import _getAllFiles from './src/getAllFiles.js';
22
- import _ignoreFolder_ignoreMe from './src/ignoreFolder/ignoreMe.js';
23
- import _ignoreMe from './src/ignoreMe.js';
24
- import _isUUID from './src/isUUID.js';
25
- import _md5 from './src/md5.js';
26
- import _password_check from './src/password/check.js';
27
- import _password_hash from './src/password/hash.js';
28
- import _setLocalEnvs from './src/setLocalEnvs.js';
29
- import _thingType from './src/thingType.js';
30
- import _toPennies from './src/toPennies.js';
31
- import _utils_buildExportsTree from './src/utils/buildExportsTree.js';
32
- import _utils_buildFileDataList from './src/utils/buildFileDataList.js';
33
- import _utils_clean from './src/utils/clean.js';
34
- import _utils_extractJSDocComment from './src/utils/extractJSDocComment.js';
35
- import _utils_generateFile from './src/utils/generateFile.js';
36
- import _utils_generateFlatExportLines from './src/utils/generateFlatExportLines.js';
37
- import _utils_generateImportStatements from './src/utils/generateImportStatements.js';
38
- import _utils_generateNamedExports from './src/utils/generateNamedExports.js';
39
- import _utils_generateNamespaceCode from './src/utils/generateNamespaceCode.js';
40
- import _utils_generateNamespaceExportLines from './src/utils/generateNamespaceExportLines.js';
41
- import _utils_shouldIgnore from './src/utils/shouldIgnore.js';
42
- import _uuid from './src/uuid.js';
43
- import _validateSchema from './src/validateSchema.js';
44
-
45
- export { _build as build };
46
- export { _combineFiles as combineFiles };
47
- export { _convertBytes as convertBytes };
48
- export { _decrypt as decrypt };
49
- export { _each as each };
50
- export { _eachAsync as eachAsync };
51
- export { _encrypt as encrypt };
52
- export { _getAllFiles as getAllFiles };
53
- export { _ignoreMe as ignoreMe };
54
- export { _isUUID as isUUID };
55
- export { _md5 as md5 };
56
- export { _setLocalEnvs as setLocalEnvs };
57
- export { _thingType as thingType };
58
- export { _toPennies as toPennies };
59
- export { _uuid as uuid };
60
- export { _validateSchema as validateSchema };
61
-
62
- export default {
1
+ /**
2
+ * This file is auto-generated by the build script.
3
+ * It consolidates API functions for use in the application.
4
+ * Do not edit manually.
5
+ */
6
+ import _build from './src/build.js';
7
+ import _clean_array from './src/clean/array.js';
8
+ import _clean_boolean from './src/clean/boolean.js';
9
+ import _clean_integer from './src/clean/integer.js';
10
+ import _clean_number from './src/clean/number.js';
11
+ import _clean_object from './src/clean/object.js';
12
+ import _clean_string from './src/clean/string.js';
13
+ import _clean_timestamp from './src/clean/timestamp.js';
14
+ import _clean_uuid from './src/clean/uuid.js';
15
+ import _combineFiles from './src/combineFiles.js';
16
+ import _convertBytes from './src/convertBytes.js';
17
+ import _decrypt from './src/decrypt.js';
18
+ import _each from './src/each.js';
19
+ import _eachAsync from './src/eachAsync.js';
20
+ import _encrypt from './src/encrypt.js';
21
+ import _getAllFiles from './src/getAllFiles.js';
22
+ import _ignoreFolder_ignoreMe from './src/ignoreFolder/ignoreMe.js';
23
+ import _ignoreMe from './src/ignoreMe.js';
24
+ import _isUUID from './src/isUUID.js';
25
+ import _md5 from './src/md5.js';
26
+ import _password_check from './src/password/check.js';
27
+ import _password_hash from './src/password/hash.js';
28
+ import _setLocalEnvs from './src/setLocalEnvs.js';
29
+ import _thingType from './src/thingType.js';
30
+ import _toPennies from './src/toPennies.js';
31
+ import _utils_buildExportsTree from './src/utils/buildExportsTree.js';
32
+ import _utils_buildFileDataList from './src/utils/buildFileDataList.js';
33
+ import _utils_clean from './src/utils/clean.js';
34
+ import _utils_extractJSDocComment from './src/utils/extractJSDocComment.js';
35
+ import _utils_generateFile from './src/utils/generateFile.js';
36
+ import _utils_generateFlatExportLines from './src/utils/generateFlatExportLines.js';
37
+ import _utils_generateImportStatements from './src/utils/generateImportStatements.js';
38
+ import _utils_generateNamedExports from './src/utils/generateNamedExports.js';
39
+ import _utils_generateNamespaceCode from './src/utils/generateNamespaceCode.js';
40
+ import _utils_generateNamespaceExportLines from './src/utils/generateNamespaceExportLines.js';
41
+ import _utils_shouldIgnore from './src/utils/shouldIgnore.js';
42
+ import _uuid from './src/uuid.js';
43
+ import _validateSchema from './src/validateSchema.js';
44
+
45
+ export { _build as build };
46
+ export { _combineFiles as combineFiles };
47
+ export { _convertBytes as convertBytes };
48
+ export { _decrypt as decrypt };
49
+ export { _each as each };
50
+ export { _eachAsync as eachAsync };
51
+ export { _encrypt as encrypt };
52
+ export { _getAllFiles as getAllFiles };
53
+ export { _ignoreMe as ignoreMe };
54
+ export { _isUUID as isUUID };
55
+ export { _md5 as md5 };
56
+ export { _setLocalEnvs as setLocalEnvs };
57
+ export { _thingType as thingType };
58
+ export { _toPennies as toPennies };
59
+ export { _uuid as uuid };
60
+ export { _validateSchema as validateSchema };
61
+
62
+ export default {
63
63
  /**
64
64
  * Builds a file from the specified source directory and writes it to the destination file.
65
65
  *
@@ -71,18 +71,18 @@ export default {
71
71
  * @param {boolean} [options.includeComments=true] - Whether to include comments in the generated file.
72
72
  * @param {boolean} [options.dts=false] - Whether to generate TypeScript declaration files.
73
73
  * @returns {Promise<boolean>} A promise that resolves to true when the build is complete.
74
- */
75
- build: _build,
76
- combineFiles: _combineFiles,
74
+ */
75
+ build: _build,
76
+ combineFiles: _combineFiles,
77
77
  /**
78
78
  * Converts a given number of bytes into a more readable string format with appropriate units.
79
79
  *
80
80
  * @param {number} bytes - The number of bytes to convert.
81
81
  * @param {number} [precision=2] - The number of decimal places to include in the result.
82
82
  * @returns {string} The converted bytes in a string format with appropriate units.
83
- */
84
- convertBytes: _convertBytes,
85
- decrypt: _decrypt,
83
+ */
84
+ convertBytes: _convertBytes,
85
+ decrypt: _decrypt,
86
86
  /**
87
87
  * Iterates over elements of an array or properties of an object, invoking a callback for each element/property.
88
88
  * The iteration stops if the callback returns `false`.
@@ -91,47 +91,47 @@ export default {
91
91
  * @param {Object|Array} objectOrArray - The object or array to iterate over.
92
92
  * @param {Function} callback - The function to invoke per iteration. It is invoked with two arguments: (value, key/index).
93
93
  * @returns {void}
94
- */
95
- each: _each,
96
- eachAsync: _eachAsync,
97
- encrypt: _encrypt,
98
- getAllFiles: _getAllFiles,
99
- ignoreMe: _ignoreMe,
100
- isUUID: _isUUID,
101
- md5: _md5,
102
- setLocalEnvs: _setLocalEnvs,
103
- thingType: _thingType,
104
- toPennies: _toPennies,
105
- uuid: _uuid,
106
- validateSchema: _validateSchema,
107
- clean: {
108
- array: _clean_array,
109
- boolean: _clean_boolean,
110
- integer: _clean_integer,
111
- number: _clean_number,
112
- object: _clean_object,
113
- string: _clean_string,
114
- timestamp: _clean_timestamp,
115
- uuid: _clean_uuid,
116
- },
117
- ignoreFolder: {
118
- ignoreMe: _ignoreFolder_ignoreMe,
119
- },
120
- password: {
121
- check: _password_check,
122
- hash: _password_hash,
123
- },
124
- utils: {
125
- buildExportsTree: _utils_buildExportsTree,
126
- buildFileDataList: _utils_buildFileDataList,
127
- clean: _utils_clean,
128
- extractJSDocComment: _utils_extractJSDocComment,
129
- generateFile: _utils_generateFile,
130
- generateFlatExportLines: _utils_generateFlatExportLines,
131
- generateImportStatements: _utils_generateImportStatements,
132
- generateNamedExports: _utils_generateNamedExports,
133
- generateNamespaceCode: _utils_generateNamespaceCode,
134
- generateNamespaceExportLines: _utils_generateNamespaceExportLines,
135
- shouldIgnore: _utils_shouldIgnore,
136
- },
94
+ */
95
+ each: _each,
96
+ eachAsync: _eachAsync,
97
+ encrypt: _encrypt,
98
+ getAllFiles: _getAllFiles,
99
+ ignoreMe: _ignoreMe,
100
+ isUUID: _isUUID,
101
+ md5: _md5,
102
+ setLocalEnvs: _setLocalEnvs,
103
+ thingType: _thingType,
104
+ toPennies: _toPennies,
105
+ uuid: _uuid,
106
+ validateSchema: _validateSchema,
107
+ clean: {
108
+ array: _clean_array,
109
+ boolean: _clean_boolean,
110
+ integer: _clean_integer,
111
+ number: _clean_number,
112
+ object: _clean_object,
113
+ string: _clean_string,
114
+ timestamp: _clean_timestamp,
115
+ uuid: _clean_uuid,
116
+ },
117
+ ignoreFolder: {
118
+ ignoreMe: _ignoreFolder_ignoreMe,
119
+ },
120
+ password: {
121
+ check: _password_check,
122
+ hash: _password_hash,
123
+ },
124
+ utils: {
125
+ buildExportsTree: _utils_buildExportsTree,
126
+ buildFileDataList: _utils_buildFileDataList,
127
+ clean: _utils_clean,
128
+ extractJSDocComment: _utils_extractJSDocComment,
129
+ generateFile: _utils_generateFile,
130
+ generateFlatExportLines: _utils_generateFlatExportLines,
131
+ generateImportStatements: _utils_generateImportStatements,
132
+ generateNamedExports: _utils_generateNamedExports,
133
+ generateNamespaceCode: _utils_generateNamespaceCode,
134
+ generateNamespaceExportLines: _utils_generateNamespaceExportLines,
135
+ shouldIgnore: _utils_shouldIgnore,
136
+ },
137
137
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesomeness-js/utils",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "description": "Awesomeness - Utils",
5
5
  "repository": {
6
6
  "type": "git",
package/schemas.js CHANGED
@@ -1,15 +1,15 @@
1
- /**
2
- * This file is auto-generated by the build script.
3
- * It consolidates API functions for use in the application.
4
- * Do not edit manually.
5
- */
6
- import _schema1 from './schemas/schema1.js';
7
- import _schema2 from './schemas/schema2.js';
8
-
9
- export { _schema1 as schema1 };
10
- export { _schema2 as schema2 };
11
-
12
- export default {
13
- schema1: _schema1,
14
- schema2: _schema2,
1
+ /**
2
+ * This file is auto-generated by the build script.
3
+ * It consolidates API functions for use in the application.
4
+ * Do not edit manually.
5
+ */
6
+ import _schema1 from './schemas/schema1.js';
7
+ import _schema2 from './schemas/schema2.js';
8
+
9
+ export { _schema1 as schema1 };
10
+ export { _schema2 as schema2 };
11
+
12
+ export default {
13
+ schema1: _schema1,
14
+ schema2: _schema2,
15
15
  };
@@ -3,7 +3,7 @@ import { readdirSync, statSync, readFileSync } from 'fs';
3
3
 
4
4
  function combineFiles(dir, fileType, {
5
5
  minify = false,
6
- moduleToBrowser = false,
6
+ processContent = ({ content, path }) => { return content; },
7
7
  } = {}) {
8
8
 
9
9
  var returnString = "";
@@ -22,14 +22,14 @@ function combineFiles(dir, fileType, {
22
22
 
23
23
  returnString += combineFiles(`${dir}/${stuff}`, fileType, {
24
24
  minify,
25
- moduleToBrowser,
25
+ processContent,
26
26
  });
27
27
 
28
28
  } else {
29
29
 
30
30
  // is file
31
31
 
32
- // get file and extenstion from stuff
32
+ // get file and extension from stuff
33
33
  let file = stuff.split('.');
34
34
  let ext = file[file.length - 1];
35
35
 
@@ -38,24 +38,12 @@ function combineFiles(dir, fileType, {
38
38
 
39
39
  let thisData = readFileSync(`${dir}/${stuff}`, 'utf8');
40
40
 
41
- if(moduleToBrowser){
41
+ if(typeof processContent === 'function'){
42
42
 
43
- // can this file be converted to browser?
44
- let browserFriendly = thisData.startsWith('export default ');
45
-
46
- if(browserFriendly){
47
- browserFriendly = thisData.includes('import') === false; // no imports allowed
48
- }
49
-
50
-
51
- if(browserFriendly){
52
-
53
- // strip properly formatted file
54
- thisData = thisData.replace('export default ', '');
55
-
56
- } else {
57
- thisData = "";
58
- }
43
+ thisData = processContent({
44
+ path: `${dir}/${stuff}`,
45
+ content: thisData,
46
+ });
59
47
 
60
48
  }
61
49
 
@@ -1,3 +1,3 @@
1
- export default function ignoreMeTest() {
1
+ export default () => {
2
2
  console.log('I should not be in the build!');
3
3
  };
@@ -0,0 +1,3 @@
1
+ export default async () => {
2
+ console.log('I should not be in the build!');
3
+ };
@@ -2,23 +2,34 @@
2
2
  import { expect, test } from 'vitest'
3
3
  import utils from '../index.js';
4
4
 
5
- let combineTest = utils.combineFiles('./src', 'js');
5
+ let combineTest = utils.combineFiles('./test', 'js');
6
6
 
7
- let combineTestBrowser = utils.combineFiles('./src', 'js', {
8
- moduleToBrowser: true
7
+ let combineTest2 = utils.combineFiles('./test', 'js', {
8
+ processContent: ({ content, path }) => {
9
+
10
+ const fnName = path.split('/')
11
+ .filter(x => x !== '') // remove empty strings
12
+ .join('.') // join with dots
13
+ .replaceAll('..', '.') // remove double dots
14
+ .replaceAll('.js', '') // remove .js
15
+ .replace(/^\./, '');
16
+
17
+ console.log({content, path});
18
+ content = content.replaceAll('export default function', `${fnName} = function`);
19
+ content = content.replaceAll('export default async function', `${fnName} = async function`);
20
+ content = content.replaceAll('export default async', `${fnName} = async`);
21
+ content = content.replaceAll('export default', `${fnName} =`);
22
+ console.log(content);
23
+ console.log('');
24
+ console.log('');
25
+ console.log('');
26
+ return content;
27
+ },
9
28
  });
10
29
 
11
30
  test('combineFiles - combine all files in src/js', () => {
12
31
  expect(combineTest).toBeDefined();
13
- expect(combineTestBrowser).toBeDefined();
14
- expect(combineTest.length).toBeGreaterThan(combineTestBrowser.length);
15
- })
16
-
17
-
18
- test('has import', () => {
19
- expect(combineTest.includes('import')).toBe(true);
20
- })
21
-
22
- test('should not have import', () => {
23
- expect(combineTestBrowser.includes('import')).toBe(false);
24
- })
32
+ expect(combineTest2).toBeDefined();
33
+ expect(combineTest).not.toEqual(combineTest2);
34
+ console.log({combineTest2});
35
+ })
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,3 +1,3 @@
1
- export default function cleanBoolean(x: any, { required }?: {
2
- required?: boolean;
3
- }): any;
1
+ export default function cleanBoolean(x: any, { required }?: {
2
+ required?: boolean;
3
+ }): any;
@@ -1,6 +1,6 @@
1
- export default function cleanInt(x: any, { required, convertString, min, max, }?: {
2
- required?: boolean;
3
- convertString?: boolean;
4
- min?: boolean;
5
- max?: boolean;
6
- }): any;
1
+ export default function cleanInt(x: any, { required, convertString, min, max, }?: {
2
+ required?: boolean;
3
+ convertString?: boolean;
4
+ min?: boolean;
5
+ max?: boolean;
6
+ }): any;
@@ -1,8 +1,8 @@
1
- export default function cleanNumber(x: any, { required, convertString, min, max, maxDecimal, minDecimal, }?: {
2
- required?: boolean;
3
- convertString?: boolean;
4
- min?: boolean;
5
- max?: boolean;
6
- maxDecimal?: boolean;
7
- minDecimal?: boolean;
8
- }): any;
1
+ export default function cleanNumber(x: any, { required, convertString, min, max, maxDecimal, minDecimal, }?: {
2
+ required?: boolean;
3
+ convertString?: boolean;
4
+ min?: boolean;
5
+ max?: boolean;
6
+ maxDecimal?: boolean;
7
+ minDecimal?: boolean;
8
+ }): any;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,7 +1,7 @@
1
- export default function cleanString(x: any, { required, minLength, maxLength, allowHtml, allowScripts }?: {
2
- required?: boolean;
3
- minLength?: boolean;
4
- maxLength?: boolean;
5
- allowHtml?: boolean;
6
- allowScripts?: boolean;
7
- }): string;
1
+ export default function cleanString(x: any, { required, minLength, maxLength, allowHtml, allowScripts }?: {
2
+ required?: boolean;
3
+ minLength?: boolean;
4
+ maxLength?: boolean;
5
+ allowHtml?: boolean;
6
+ allowScripts?: boolean;
7
+ }): string;
@@ -1,2 +1,2 @@
1
- declare function _default(thing: any, schema: any): any;
2
- export default _default;
1
+ declare function _default(thing: any, schema: any): any;
2
+ export default _default;
@@ -1,5 +1,5 @@
1
- export default function cleanTimestamp(isoDateTimeString: any, { required, maxDaysInFuture, maxDaysInFPast, }?: {
2
- required?: boolean;
3
- maxDaysInFuture?: boolean;
4
- maxDaysInFPast?: boolean;
5
- }): string;
1
+ export default function cleanTimestamp(isoDateTimeString: any, { required, maxDaysInFuture, maxDaysInFPast, }?: {
2
+ required?: boolean;
3
+ maxDaysInFuture?: boolean;
4
+ maxDaysInFPast?: boolean;
5
+ }): string;
@@ -1,3 +1,3 @@
1
- export default function cleanUUID(uuid: any, { required, }?: {
2
- required?: boolean;
3
- }): string;
1
+ export default function cleanUUID(uuid: any, { required, }?: {
2
+ required?: boolean;
3
+ }): string;
package/types/each.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- /**
2
- * Iterates over elements of an array or properties of an object, invoking a callback for each element/property.
3
- * The iteration stops if the callback returns `false`.
4
- *
5
- * @example each({ a: 1, b: 2 }, (value, key) => { console.log(value, key); });
6
- * @param {Object|Array} objectOrArray - The object or array to iterate over.
7
- * @param {Function} callback - The function to invoke per iteration. It is invoked with two arguments: (value, key/index).
8
- * @returns {void}
9
- */
10
- export default function each(objectOrArray: any | any[], callback: Function): void;
1
+ /**
2
+ * Iterates over elements of an array or properties of an object, invoking a callback for each element/property.
3
+ * The iteration stops if the callback returns `false`.
4
+ *
5
+ * @example each({ a: 1, b: 2 }, (value, key) => { console.log(value, key); });
6
+ * @param {Object|Array} objectOrArray - The object or array to iterate over.
7
+ * @param {Function} callback - The function to invoke per iteration. It is invoked with two arguments: (value, key/index).
8
+ * @returns {void}
9
+ */
10
+ export default function each(objectOrArray: any | any[], callback: Function): void;
@@ -1 +1 @@
1
- export default function hashPassword(password: any): string;
1
+ export default function hashPassword(password: any): string;
package/types/index.d.ts CHANGED
@@ -1,65 +1,65 @@
1
- /**
2
- * This file is auto-generated by the build script.
3
- * It consolidates API type declarations for use in the application.
4
- * Do not edit manually.
5
- */
6
- import type _build from './build';
7
- import type _clean_array from './clean/array';
8
- import type _clean_boolean from './clean/boolean';
9
- import type _clean_integer from './clean/integer';
10
- import type _clean_number from './clean/number';
11
- import type _clean_object from './clean/object';
12
- import type _clean_string from './clean/string';
13
- import type _clean_timestamp from './clean/timestamp';
14
- import type _clean_uuid from './clean/uuid';
15
- import type _combineFiles from './combineFiles';
16
- import type _convertBytes from './convertBytes';
17
- import type _decrypt from './decrypt';
18
- import type _each from './each';
19
- import type _eachAsync from './eachAsync';
20
- import type _encrypt from './encrypt';
21
- import type _getAllFiles from './getAllFiles';
22
- import type _ignoreFolder_ignoreMe from './ignoreFolder/ignoreMe';
23
- import type _ignoreMe from './ignoreMe';
24
- import type _isUUID from './isUUID';
25
- import type _md5 from './md5';
26
- import type _password_check from './password/check';
27
- import type _password_hash from './password/hash';
28
- import type _setLocalEnvs from './setLocalEnvs';
29
- import type _thingType from './thingType';
30
- import type _toPennies from './toPennies';
31
- import type _utils_buildExportsTree from './utils/buildExportsTree';
32
- import type _utils_buildFileDataList from './utils/buildFileDataList';
33
- import type _utils_clean from './utils/clean';
34
- import type _utils_extractJSDocComment from './utils/extractJSDocComment';
35
- import type _utils_generateFile from './utils/generateFile';
36
- import type _utils_generateFlatExportLines from './utils/generateFlatExportLines';
37
- import type _utils_generateImportStatements from './utils/generateImportStatements';
38
- import type _utils_generateNamedExports from './utils/generateNamedExports';
39
- import type _utils_generateNamespaceCode from './utils/generateNamespaceCode';
40
- import type _utils_generateNamespaceExportLines from './utils/generateNamespaceExportLines';
41
- import type _utils_shouldIgnore from './utils/shouldIgnore';
42
- import type _uuid from './uuid';
43
- import type _validateSchema from './validateSchema';
44
-
45
- export declare const build: typeof _build;
46
- export declare const combineFiles: typeof _combineFiles;
47
- export declare const convertBytes: typeof _convertBytes;
48
- export declare const decrypt: typeof _decrypt;
49
- export declare const each: typeof _each;
50
- export declare const eachAsync: typeof _eachAsync;
51
- export declare const encrypt: typeof _encrypt;
52
- export declare const getAllFiles: typeof _getAllFiles;
53
- export declare const ignoreMe: typeof _ignoreMe;
54
- export declare const isUUID: typeof _isUUID;
55
- export declare const md5: typeof _md5;
56
- export declare const setLocalEnvs: typeof _setLocalEnvs;
57
- export declare const thingType: typeof _thingType;
58
- export declare const toPennies: typeof _toPennies;
59
- export declare const uuid: typeof _uuid;
60
- export declare const validateSchema: typeof _validateSchema;
61
-
62
- declare const _default: {
1
+ /**
2
+ * This file is auto-generated by the build script.
3
+ * It consolidates API type declarations for use in the application.
4
+ * Do not edit manually.
5
+ */
6
+ import type _build from './build';
7
+ import type _clean_array from './clean/array';
8
+ import type _clean_boolean from './clean/boolean';
9
+ import type _clean_integer from './clean/integer';
10
+ import type _clean_number from './clean/number';
11
+ import type _clean_object from './clean/object';
12
+ import type _clean_string from './clean/string';
13
+ import type _clean_timestamp from './clean/timestamp';
14
+ import type _clean_uuid from './clean/uuid';
15
+ import type _combineFiles from './combineFiles';
16
+ import type _convertBytes from './convertBytes';
17
+ import type _decrypt from './decrypt';
18
+ import type _each from './each';
19
+ import type _eachAsync from './eachAsync';
20
+ import type _encrypt from './encrypt';
21
+ import type _getAllFiles from './getAllFiles';
22
+ import type _ignoreFolder_ignoreMe from './ignoreFolder/ignoreMe';
23
+ import type _ignoreMe from './ignoreMe';
24
+ import type _isUUID from './isUUID';
25
+ import type _md5 from './md5';
26
+ import type _password_check from './password/check';
27
+ import type _password_hash from './password/hash';
28
+ import type _setLocalEnvs from './setLocalEnvs';
29
+ import type _thingType from './thingType';
30
+ import type _toPennies from './toPennies';
31
+ import type _utils_buildExportsTree from './utils/buildExportsTree';
32
+ import type _utils_buildFileDataList from './utils/buildFileDataList';
33
+ import type _utils_clean from './utils/clean';
34
+ import type _utils_extractJSDocComment from './utils/extractJSDocComment';
35
+ import type _utils_generateFile from './utils/generateFile';
36
+ import type _utils_generateFlatExportLines from './utils/generateFlatExportLines';
37
+ import type _utils_generateImportStatements from './utils/generateImportStatements';
38
+ import type _utils_generateNamedExports from './utils/generateNamedExports';
39
+ import type _utils_generateNamespaceCode from './utils/generateNamespaceCode';
40
+ import type _utils_generateNamespaceExportLines from './utils/generateNamespaceExportLines';
41
+ import type _utils_shouldIgnore from './utils/shouldIgnore';
42
+ import type _uuid from './uuid';
43
+ import type _validateSchema from './validateSchema';
44
+
45
+ export declare const build: typeof _build;
46
+ export declare const combineFiles: typeof _combineFiles;
47
+ export declare const convertBytes: typeof _convertBytes;
48
+ export declare const decrypt: typeof _decrypt;
49
+ export declare const each: typeof _each;
50
+ export declare const eachAsync: typeof _eachAsync;
51
+ export declare const encrypt: typeof _encrypt;
52
+ export declare const getAllFiles: typeof _getAllFiles;
53
+ export declare const ignoreMe: typeof _ignoreMe;
54
+ export declare const isUUID: typeof _isUUID;
55
+ export declare const md5: typeof _md5;
56
+ export declare const setLocalEnvs: typeof _setLocalEnvs;
57
+ export declare const thingType: typeof _thingType;
58
+ export declare const toPennies: typeof _toPennies;
59
+ export declare const uuid: typeof _uuid;
60
+ export declare const validateSchema: typeof _validateSchema;
61
+
62
+ declare const _default: {
63
63
  /**
64
64
  * Builds a file from the specified source directory and writes it to the destination file.
65
65
  *
@@ -71,18 +71,18 @@ declare const _default: {
71
71
  * @param {boolean} [options.includeComments=true] - Whether to include comments in the generated file.
72
72
  * @param {boolean} [options.dts=false] - Whether to generate TypeScript declaration files.
73
73
  * @returns {Promise<boolean>} A promise that resolves to true when the build is complete.
74
- */
75
- build: typeof _build;
76
- combineFiles: typeof _combineFiles;
74
+ */
75
+ build: typeof _build;
76
+ combineFiles: typeof _combineFiles;
77
77
  /**
78
78
  * Converts a given number of bytes into a more readable string format with appropriate units.
79
79
  *
80
80
  * @param {number} bytes - The number of bytes to convert.
81
81
  * @param {number} [precision=2] - The number of decimal places to include in the result.
82
82
  * @returns {string} The converted bytes in a string format with appropriate units.
83
- */
84
- convertBytes: typeof _convertBytes;
85
- decrypt: typeof _decrypt;
83
+ */
84
+ convertBytes: typeof _convertBytes;
85
+ decrypt: typeof _decrypt;
86
86
  /**
87
87
  * Iterates over elements of an array or properties of an object, invoking a callback for each element/property.
88
88
  * The iteration stops if the callback returns `false`.
@@ -91,49 +91,49 @@ declare const _default: {
91
91
  * @param {Object|Array} objectOrArray - The object or array to iterate over.
92
92
  * @param {Function} callback - The function to invoke per iteration. It is invoked with two arguments: (value, key/index).
93
93
  * @returns {void}
94
- */
95
- each: typeof _each;
96
- eachAsync: typeof _eachAsync;
97
- encrypt: typeof _encrypt;
98
- getAllFiles: typeof _getAllFiles;
99
- ignoreMe: typeof _ignoreMe;
100
- isUUID: typeof _isUUID;
101
- md5: typeof _md5;
102
- setLocalEnvs: typeof _setLocalEnvs;
103
- thingType: typeof _thingType;
104
- toPennies: typeof _toPennies;
105
- uuid: typeof _uuid;
106
- validateSchema: typeof _validateSchema;
107
- clean: {
108
- array: typeof _clean_array,
109
- boolean: typeof _clean_boolean,
110
- integer: typeof _clean_integer,
111
- number: typeof _clean_number,
112
- object: typeof _clean_object,
113
- string: typeof _clean_string,
114
- timestamp: typeof _clean_timestamp,
115
- uuid: typeof _clean_uuid,
116
- },
117
- ignoreFolder: {
118
- ignoreMe: typeof _ignoreFolder_ignoreMe,
119
- },
120
- password: {
121
- check: typeof _password_check,
122
- hash: typeof _password_hash,
123
- },
124
- utils: {
125
- buildExportsTree: typeof _utils_buildExportsTree,
126
- buildFileDataList: typeof _utils_buildFileDataList,
127
- clean: typeof _utils_clean,
128
- extractJSDocComment: typeof _utils_extractJSDocComment,
129
- generateFile: typeof _utils_generateFile,
130
- generateFlatExportLines: typeof _utils_generateFlatExportLines,
131
- generateImportStatements: typeof _utils_generateImportStatements,
132
- generateNamedExports: typeof _utils_generateNamedExports,
133
- generateNamespaceCode: typeof _utils_generateNamespaceCode,
134
- generateNamespaceExportLines: typeof _utils_generateNamespaceExportLines,
135
- shouldIgnore: typeof _utils_shouldIgnore,
136
- },
137
- };
138
-
139
- export default _default;
94
+ */
95
+ each: typeof _each;
96
+ eachAsync: typeof _eachAsync;
97
+ encrypt: typeof _encrypt;
98
+ getAllFiles: typeof _getAllFiles;
99
+ ignoreMe: typeof _ignoreMe;
100
+ isUUID: typeof _isUUID;
101
+ md5: typeof _md5;
102
+ setLocalEnvs: typeof _setLocalEnvs;
103
+ thingType: typeof _thingType;
104
+ toPennies: typeof _toPennies;
105
+ uuid: typeof _uuid;
106
+ validateSchema: typeof _validateSchema;
107
+ clean: {
108
+ array: typeof _clean_array,
109
+ boolean: typeof _clean_boolean,
110
+ integer: typeof _clean_integer,
111
+ number: typeof _clean_number,
112
+ object: typeof _clean_object,
113
+ string: typeof _clean_string,
114
+ timestamp: typeof _clean_timestamp,
115
+ uuid: typeof _clean_uuid,
116
+ },
117
+ ignoreFolder: {
118
+ ignoreMe: typeof _ignoreFolder_ignoreMe,
119
+ },
120
+ password: {
121
+ check: typeof _password_check,
122
+ hash: typeof _password_hash,
123
+ },
124
+ utils: {
125
+ buildExportsTree: typeof _utils_buildExportsTree,
126
+ buildFileDataList: typeof _utils_buildFileDataList,
127
+ clean: typeof _utils_clean,
128
+ extractJSDocComment: typeof _utils_extractJSDocComment,
129
+ generateFile: typeof _utils_generateFile,
130
+ generateFlatExportLines: typeof _utils_generateFlatExportLines,
131
+ generateImportStatements: typeof _utils_generateImportStatements,
132
+ generateNamedExports: typeof _utils_generateNamedExports,
133
+ generateNamespaceCode: typeof _utils_generateNamespaceCode,
134
+ generateNamespaceExportLines: typeof _utils_generateNamespaceExportLines,
135
+ shouldIgnore: typeof _utils_shouldIgnore,
136
+ },
137
+ };
138
+
139
+ export default _default;
@@ -1,2 +1,2 @@
1
- declare function _default(thing: any): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "null";
2
- export default _default;
1
+ declare function _default(thing: any): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "null";
2
+ export default _default;
@@ -1,2 +1,2 @@
1
- export default cleanArray;
2
- declare function cleanArray(arr: any, schema?: {}): any[];
1
+ export default cleanArray;
2
+ declare function cleanArray(arr: any, schema?: {}): any[];
@@ -1 +1 @@
1
- export default function validatePassword(password: any, storedHash: any): boolean;
1
+ export default function validatePassword(password: any, storedHash: any): boolean;
@@ -1,2 +1,2 @@
1
- export default validateSchema;
2
- declare function validateSchema(schema: any): boolean;
1
+ export default validateSchema;
2
+ declare function validateSchema(schema: any): boolean;