@e-mc/types 0.8.2 → 0.8.3

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/constant.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export const enum INTERNAL {
2
- VERSION = '0.8.2',
2
+ VERSION = '0.8.3',
3
3
  TEMP_DIR = 'tmp', // eslint-disable-line @typescript-eslint/no-shadow
4
4
  CJS = '__cjs__'
5
5
  }
@@ -7,6 +7,7 @@ export const enum INTERNAL {
7
7
  export const enum VAL_MESSAGE {
8
8
  SUCCESS = 'Success',
9
9
  COMPLETED = 'Completed',
10
+ CHECKSUM = 'Checksum matched',
10
11
  MODIFIED_DIRECTORY = 'Directory was modified',
11
12
  COMMIT_TRANSACTION = 'Transactions were committed'
12
13
  }
@@ -28,6 +29,7 @@ export const enum VAL_CLOUD {
28
29
  EMPTY_BUCKET = 'Bucket emptied',
29
30
  CONFIGURE_BUCKET = 'Bucket configured',
30
31
  POLICY_BUCKET = 'Bucket policy configured',
32
+ WEBSITE_BUCKET = 'Bucket website configured',
31
33
  ACL_BUCKET = 'Bucket ACL configured'
32
34
  }
33
35
 
@@ -57,6 +59,7 @@ export const enum ERR_MESSAGE {
57
59
  TIMEOUT = 'Timeout was exceeded',
58
60
  HANDLED_REJECTION = 'Handled rejection',
59
61
  UNSUPPORTED_ACCESS = 'Unsupported access',
62
+ UNSUPPORTED_MIME = 'Unsupported MIME',
60
63
  UNSUPPORTED_READ = 'Not permitted to read file',
61
64
  UNSUPPORTED_WRITE = 'Not permitted to write file',
62
65
  NOTFOUND_FILE = 'File not found',
@@ -123,8 +126,11 @@ export const enum ERR_CLOUD {
123
126
  CONSTRUCTOR = 'Not a Cloud constructor',
124
127
  CREATE_BUCKET = 'Unable to create bucket',
125
128
  POLICY_BUCKET = 'Unable to update bucket policy',
129
+ TAGGING_BUCKET = 'Unable to update bucket tagging',
130
+ WEBSITE_BUCKET = 'Unable to set bucket website',
126
131
  DELETE_BUCKET = 'Unable to empty bucket',
127
132
  CONFIGURE_BUCKET = 'Unable to configure bucket',
133
+ CREATE_TAG = 'Unable to create tags',
128
134
  EXISTS_BUCKET = 'Bucket does not exist',
129
135
  POLICY_INVALID = 'Invalid bucket policy',
130
136
  LIST_BUCKET = 'Unable to list bucket',
@@ -135,6 +141,7 @@ export const enum ERR_CLOUD {
135
141
  MODULE_NOTFOUND = 'Cloud module not installed',
136
142
  CREATE_BUCKET_SUPPORT = 'Create bucket not supported',
137
143
  BUCKET_POLICY_SUPPORT = 'Bucket policy not supported',
144
+ BUCKET_TAGGING_SUPPORT = 'Bucket tagging not supported',
138
145
  DELETE_OBJECTS_SUPPORT = 'Delete objects not supported',
139
146
  BUCKET_WEBSITE_SUPPORT = 'Set bucket website not supported',
140
147
  EXECUTE_QUERY_SUPPORT = 'Execute query not supported',
package/index.js CHANGED
@@ -5,7 +5,6 @@ exports.generateUUID = exports.incrementUUID = exports.purgeMemory = exports.err
5
5
  const path = require("path");
6
6
  const fs = require("fs");
7
7
  const crypto = require("crypto");
8
- const uuid = require("uuid");
9
8
  const bytes = require("bytes");
10
9
  class AbortError extends Error {
11
10
  constructor() {
@@ -323,8 +322,8 @@ var IMPORT_MAP;
323
322
  IMPORT_MAP["@squared-functions/document/packages/@babel/core"] = "@pi-r/babel";
324
323
  IMPORT_MAP["@squared-functions/document/packages/clean-css"] = "@pi-r/clean-css";
325
324
  IMPORT_MAP["@squared-functions/document/packages/eslint"] = "@pi-r/eslint";
326
- IMPORT_MAP["@squared-functions/document/packages/html-minifier-terser"] = "@pi-r/html-minifier-terser";
327
325
  IMPORT_MAP["@squared-functions/document/packages/html-minifier"] = "@pi-r/html-minifier";
326
+ IMPORT_MAP["@squared-functions/document/packages/html-minifier-terser"] = "@pi-r/html-minifier-terser";
328
327
  IMPORT_MAP["@squared-functions/document/packages/html-validate"] = "@pi-r/html-validate";
329
328
  IMPORT_MAP["@squared-functions/document/packages/postcss"] = "@pi-r/postcss";
330
329
  IMPORT_MAP["@squared-functions/document/packages/posthtml"] = "@pi-r/posthtml";
@@ -830,11 +829,11 @@ function getEncoding(value, fallback = 'utf-8') {
830
829
  case 'utf8':
831
830
  case 'utf-8':
832
831
  case 'utf16le':
833
- case 'utf-16le':
834
832
  return value;
833
+ case 'utf-16le':
835
834
  case 'utf16':
836
835
  case 'utf-16':
837
- return 'utf-16le';
836
+ return 'utf16le';
838
837
  }
839
838
  if (Buffer.isEncoding(value)) {
840
839
  return value;
@@ -933,4 +932,4 @@ function incrementUUID(restart) {
933
932
  return INCREMENT_PREFIX + (INCREMENT_COUNT++).toString(16).padStart(4, '0');
934
933
  }
935
934
  exports.incrementUUID = incrementUUID;
936
- exports.generateUUID = typeof crypto.randomUUID === 'function' ? crypto.randomUUID.bind(crypto) : uuid.v4;
935
+ exports.generateUUID = typeof crypto.randomUUID === 'function' ? crypto.randomUUID.bind(crypto) : require('uuid').v4;
@@ -19,6 +19,13 @@ export const enum FINALIZE_STATE {
19
19
  ABORTED = 6
20
20
  }
21
21
 
22
+ export const enum INCREMENTAL {
23
+ NONE = 'none',
24
+ STAGING = 'staging',
25
+ ETAG = 'etag',
26
+ EXISTS = 'exists'
27
+ }
28
+
22
29
  export interface RequestData<T extends ExternalAsset = ExternalAsset> extends IRequestData<T>, RequestInit {
23
30
  timeout?: ObjectMap<NumString>;
24
31
  }
package/lib/logger.d.ts CHANGED
@@ -94,10 +94,9 @@ export interface LogTypeValue {
94
94
  sessionId?: string;
95
95
  }
96
96
 
97
- export interface LogArguments {
98
- type?: LogType;
99
- value?: LogValue;
97
+ export interface LogArguments extends Pick<LogBaseOptions, "type" | "sessionId"> {
100
98
  title?: string;
99
+ value?: LogValue;
101
100
  message?: unknown;
102
101
  }
103
102
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/types",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "Type definitions for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/anpham6/e-mc.git",
12
+ "url": "git+https://github.com/anpham6/e-mc.git",
13
13
  "directory": "src/types"
14
14
  },
15
15
  "keywords": [