@e-mc/compat-v4 0.7.0 → 0.7.2

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 (4) hide show
  1. package/LICENSE +10 -10
  2. package/README.md +5 -3
  3. package/index.js +35 -39
  4. package/package.json +6 -6
package/LICENSE CHANGED
@@ -1,11 +1,11 @@
1
- Copyright 2023 An Pham
2
-
3
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
-
5
- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6
-
7
- 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
-
9
- 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10
-
1
+ Copyright 2023 Wit Studio
2
+
3
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
+
5
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6
+
7
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
+
9
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10
+
11
11
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
- ### @e-mc/compat-v4
1
+ # @e-mc/compat-v4
2
2
 
3
- ### LICENSE
3
+ PEP 402 - Forever Mikasa
4
4
 
5
- BSD 3-Clause
5
+ ## LICENSE
6
+
7
+ MIT
package/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const path = require("path");
4
- const V4 = require("../module/lib-v4");
5
- const types_1 = require("../types");
4
+ const V4 = require("@e-mc/module/lib-v4");
5
+ const types_1 = require("@e-mc/types");
6
6
  function setModule(name, target, self) {
7
7
  try {
8
8
  require(name);
@@ -15,8 +15,8 @@ function setModule(name, target, self) {
15
15
  if (pathname.endsWith(name)) {
16
16
  if (target) {
17
17
  switch (name) {
18
- case "@squared-functions/compress" /* FUNCTIONS.COMPRESS */:
19
- case "@squared-functions/compress-v1" /* FUNCTIONS.COMPRESS_V1 */:
18
+ case "@squared-functions/compress":
19
+ case "@squared-functions/compress-v1":
20
20
  target = target.singleton();
21
21
  break;
22
22
  }
@@ -32,33 +32,30 @@ function setModule(name, target, self) {
32
32
  }
33
33
  }
34
34
  try {
35
- const Module = require("@e-mc/module" /* PACKAGE_NAME.MODULE */);
35
+ const Module = require("@e-mc/module");
36
36
  const kStartCPU = Symbol('startCPU');
37
37
  for (const name in V4) {
38
- // @ts-ignore
39
38
  Module[name] = V4[name].bind(Module);
40
39
  }
41
40
  Object.defineProperties(Module.prototype, {
42
41
  [kStartCPU]: { value: null, writable: true },
43
42
  startCPU: {
44
43
  set(value) {
45
- // @ts-ignore
46
44
  this[kStartCPU] = value;
47
45
  },
48
46
  get() {
49
47
  let host;
50
- // @ts-ignore
51
48
  return this[kStartCPU] || (host = this.host) && host.startCPU;
52
49
  }
53
50
  }
54
51
  });
55
- setModule("@squared-functions/module" /* FUNCTIONS.MODULE */, Module);
52
+ setModule("@squared-functions/module", Module);
56
53
  }
57
54
  catch {
58
55
  }
59
56
  try {
60
- const FileManager = require("@e-mc/file-manager" /* PACKAGE_NAME.FILE_MANAGER */);
61
- const Request = require("@e-mc/request" /* PACKAGE_NAME.REQUEST */);
57
+ const FileManager = require("@e-mc/file-manager");
58
+ const Request = require("@e-mc/request");
62
59
  FileManager.fromHttpStatusCode = Request.fromStatusCode.bind(FileManager);
63
60
  FileManager.defineHttpAgent = Request.defineHttpAgent.bind(FileManager);
64
61
  FileManager.defineDnsLookup = Request.defineDnsLookup.bind(FileManager);
@@ -102,7 +99,6 @@ try {
102
99
  set(value) {
103
100
  const kIncremental = Object.getOwnPropertySymbols(this).find(sym => sym.toString() === 'Symbol(incremental)');
104
101
  if (kIncremental) {
105
- // @ts-ignore
106
102
  this[kIncremental] = value ? 'staging' : 'none';
107
103
  }
108
104
  },
@@ -189,21 +185,21 @@ try {
189
185
  }
190
186
  }
191
187
  });
192
- setModule("@squared-functions/file-manager" /* FUNCTIONS.FILE_MANAGER */, FileManager);
188
+ setModule("@squared-functions/file-manager", FileManager);
193
189
  }
194
190
  catch {
195
191
  }
196
192
  try {
197
- const Image = require("@e-mc/image" /* PACKAGE_NAME.IMAGE */);
193
+ const Image = require("@e-mc/image");
198
194
  Image.using = async function (instance, data, command) {
199
195
  return instance.using?.(data, command);
200
196
  };
201
- setModule("@squared-functions/image-v3" /* FUNCTIONS.IMAGE_V3 */, Image);
197
+ setModule("@squared-functions/image-v3", Image);
202
198
  }
203
199
  catch {
204
200
  }
205
201
  try {
206
- const Cloud = require("@e-mc/cloud" /* PACKAGE_NAME.CLOUD */);
202
+ const Cloud = require("@e-mc/cloud");
207
203
  Cloud.prototype.hasDatabaseCache = function (service, sessionKey) {
208
204
  return this.hasCache(service, sessionKey);
209
205
  };
@@ -216,24 +212,24 @@ try {
216
212
  Cloud.prototype.setDatabaseResult = function (service, credential, queryString, result, options) {
217
213
  return this.setQueryResult(service, credential, queryString, result, options);
218
214
  };
219
- setModule("@squared-functions/cloud" /* FUNCTIONS.CLOUD */, Cloud);
215
+ setModule("@squared-functions/cloud", Cloud);
220
216
  }
221
217
  catch {
222
218
  }
223
219
  try {
224
- const Watch = require("@e-mc/watch" /* PACKAGE_NAME.WATCH */);
225
- const Request = require("@e-mc/request" /* PACKAGE_NAME.REQUEST */);
220
+ const Watch = require("@e-mc/watch");
221
+ const Request = require("@e-mc/request");
226
222
  Watch.readCACert = Request.readCACert.bind(Watch);
227
223
  Watch.readTLSKey = Request.readTLSKey.bind(Watch);
228
224
  Watch.readTLSCert = Request.readTLSCert.bind(Watch);
229
225
  Watch.isCert = Request.isCert.bind(Watch);
230
226
  Watch.parseExpires = types_1.parseExpires.bind(Watch);
231
- setModule("@squared-functions/watch" /* FUNCTIONS.WATCH */, Watch);
227
+ setModule("@squared-functions/watch", Watch);
232
228
  }
233
229
  catch {
234
230
  }
235
231
  try {
236
- const { TransformSeries } = require("@e-mc/document/transform" /* PACKAGE_NAME.DOCUMENT_TRANSFORM */);
232
+ const { TransformSeries } = require("@e-mc/document/transform");
237
233
  Object.defineProperties(TransformSeries.prototype, {
238
234
  outSourceFiles: {
239
235
  set(value) {
@@ -268,28 +264,28 @@ try {
268
264
  }
269
265
  }
270
266
  });
271
- const Util = require("@squared-functions/document/util" /* FUNCTIONS.DOCUMENT_UTIL */);
267
+ const Util = require("@squared-functions/document/util");
272
268
  Util.parseExpires = types_1.parseExpires;
273
269
  }
274
270
  catch {
275
271
  }
276
272
  [
277
- ["@squared-functions/types" /* FUNCTIONS.TYPES */, "@e-mc/types" /* PACKAGE_NAME.TYPES */],
278
- ["@squared-functions/compress" /* FUNCTIONS.COMPRESS */, "@e-mc/compress" /* PACKAGE_NAME.COMPRESS */],
279
- ["@squared-functions/compress-v1" /* FUNCTIONS.COMPRESS_V1 */, "@e-mc/compress" /* PACKAGE_NAME.COMPRESS */],
280
- ["@squared-functions/compress-v3" /* FUNCTIONS.COMPRESS_V3 */, "@e-mc/compress" /* PACKAGE_NAME.COMPRESS */],
281
- ["@squared-functions/core" /* FUNCTIONS.CORE */, "@e-mc/core" /* PACKAGE_NAME.CORE */],
282
- ["@squared-functions/db" /* FUNCTIONS.DB */, "@e-mc/db" /* PACKAGE_NAME.DB */],
283
- ["@squared-functions/db/pool" /* FUNCTIONS.DB_POOL */, "@e-mc/db/pool" /* PACKAGE_NAME.DB_POOL */, '1'],
284
- ["@squared-functions/document" /* FUNCTIONS.DOCUMENT */, "@e-mc/document" /* PACKAGE_NAME.DOCUMENT */],
285
- ["@squared-functions/document/android" /* FUNCTIONS.DOCUMENT_ANDROID */, "@pi-r/android" /* PACKAGE_NAME.DOCUMENT_ANDROID */],
286
- ["@squared-functions/document/chrome" /* FUNCTIONS.DOCUMENT_CHROME */, "@pi-r/chrome" /* PACKAGE_NAME.DOCUMENT_CHROME */],
287
- ["@squared-functions/document/transform" /* FUNCTIONS.DOCUMENT_TRANSFORM */, "@e-mc/document/transform" /* PACKAGE_NAME.DOCUMENT_TRANSFORM */],
288
- ["@squared-functions/file-manager/http/host" /* FUNCTIONS.FILE_MANAGER_HTTP_HOST */, "@e-mc/request/http/host" /* PACKAGE_NAME.REQUEST_HTTP_HOST */],
289
- ["@squared-functions/image-v3/jimp" /* FUNCTIONS.IMAGE_V3_JIMP */, "@pi-r/jimp" /* PACKAGE_NAME.IMAGE_JIMP */],
290
- ["@squared-functions/task" /* FUNCTIONS.TASK */, "@e-mc/task" /* PACKAGE_NAME.TASK */],
291
- ["@squared-functions/task/gulp" /* FUNCTIONS.TASK_GULP */, "@pi-r/gulp" /* PACKAGE_NAME.TASK_GULP */],
292
- ["@squared-functions/watch/filegroup" /* FUNCTIONS.WATCH_FILEGROUP */, "@e-mc/watch/filegroup" /* PACKAGE_NAME.WATCH_FILEGROUP */],
293
- ["@e-mc/compat-v4" /* PACKAGE_NAME.COMPAT_V4 */]
273
+ ["@squared-functions/types", "@e-mc/types"],
274
+ ["@squared-functions/compress", "@e-mc/compress"],
275
+ ["@squared-functions/compress-v1", "@e-mc/compress"],
276
+ ["@squared-functions/compress-v3", "@e-mc/compress"],
277
+ ["@squared-functions/core", "@e-mc/core"],
278
+ ["@squared-functions/db", "@e-mc/db"],
279
+ ["@squared-functions/db/pool", "@e-mc/db/pool", '1'],
280
+ ["@squared-functions/document", "@e-mc/document"],
281
+ ["@squared-functions/document/android", "@pi-r/android"],
282
+ ["@squared-functions/document/chrome", "@pi-r/chrome"],
283
+ ["@squared-functions/document/transform", "@e-mc/document/transform"],
284
+ ["@squared-functions/file-manager/http/host", "@e-mc/request/http/host"],
285
+ ["@squared-functions/image-v3/jimp", "@pi-r/jimp"],
286
+ ["@squared-functions/task", "@e-mc/task"],
287
+ ["@squared-functions/task/gulp", "@pi-r/gulp"],
288
+ ["@squared-functions/watch/filegroup", "@e-mc/watch/filegroup"],
289
+ ["@e-mc/compat-v4"]
294
290
  ]
295
291
  .forEach(item => setModule(item[0], item[1], item[2]));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/compat-v4",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Base class compatibility with squared-functions.",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/anpham6/e-mc.git",
11
+ "url": "git+https://github.com/anpham6/e-mc.git",
12
12
  "directory": "src/compat-v4"
13
13
  },
14
14
  "keywords": [
@@ -19,11 +19,11 @@
19
19
  "name": "An Pham",
20
20
  "email": "anpham6@gmail.com"
21
21
  },
22
- "license": "BSD 3-Clause",
22
+ "license": "MIT",
23
23
  "homepage": "https://github.com/anpham6/e-mc#readme",
24
24
  "dependencies": {
25
- "@e-mc/module": "0.7.0",
26
- "@e-mc/request": "0.7.0",
27
- "@e-mc/types": "0.7.0"
25
+ "@e-mc/module": "0.7.2",
26
+ "@e-mc/request": "0.7.2",
27
+ "@e-mc/types": "0.7.2"
28
28
  }
29
29
  }