@e-mc/document 0.8.10 → 0.8.12
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/README.md +9 -9
- package/index.js +4 -4
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## Interface
|
|
11
11
|
|
|
12
|
-
- https://www.unpkg.com/@e-mc/types@0.8.
|
|
12
|
+
- https://www.unpkg.com/@e-mc/types@0.8.12/lib/index.d.ts
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { DataSource, ViewEngine } from "./squared";
|
|
@@ -85,14 +85,14 @@ interface DocumentConstructor extends ModuleConstructor {
|
|
|
85
85
|
|
|
86
86
|
## References
|
|
87
87
|
|
|
88
|
-
- https://www.unpkg.com/@e-mc/types@0.8.
|
|
89
|
-
- https://www.unpkg.com/@e-mc/types@0.8.
|
|
90
|
-
- https://www.unpkg.com/@e-mc/types@0.8.
|
|
91
|
-
- https://www.unpkg.com/@e-mc/types@0.8.
|
|
92
|
-
- https://www.unpkg.com/@e-mc/types@0.8.
|
|
93
|
-
- https://www.unpkg.com/@e-mc/types@0.8.
|
|
94
|
-
- https://www.unpkg.com/@e-mc/types@0.8.
|
|
95
|
-
- https://www.unpkg.com/@e-mc/types@0.8.
|
|
88
|
+
- https://www.unpkg.com/@e-mc/types@0.8.12/lib/squared.d.ts
|
|
89
|
+
- https://www.unpkg.com/@e-mc/types@0.8.12/lib/asset.d.ts
|
|
90
|
+
- https://www.unpkg.com/@e-mc/types@0.8.12/lib/core.d.ts
|
|
91
|
+
- https://www.unpkg.com/@e-mc/types@0.8.12/lib/document.d.ts
|
|
92
|
+
- https://www.unpkg.com/@e-mc/types@0.8.12/lib/filemanager.d.ts
|
|
93
|
+
- https://www.unpkg.com/@e-mc/types@0.8.12/lib/logger.d.ts
|
|
94
|
+
- https://www.unpkg.com/@e-mc/types@0.8.12/lib/settings.d.ts
|
|
95
|
+
- https://www.unpkg.com/@e-mc/types@0.8.12/lib/watch.d.ts
|
|
96
96
|
|
|
97
97
|
## LICENSE
|
|
98
98
|
|
package/index.js
CHANGED
|
@@ -619,14 +619,14 @@ class Document extends core_1.Client {
|
|
|
619
619
|
}
|
|
620
620
|
let result;
|
|
621
621
|
if ((value = value.trim()).startsWith('npm:')) {
|
|
622
|
+
if (!core_1.Client.enabled("node.require.npm")) {
|
|
623
|
+
return null;
|
|
624
|
+
}
|
|
622
625
|
const pkgName = value.substring(4);
|
|
623
626
|
if (persist) {
|
|
624
627
|
result = CACHE_REQUIRE[pkgName];
|
|
625
628
|
}
|
|
626
629
|
if (!result) {
|
|
627
|
-
if (!core_1.Client.enabled("node.require.npm")) {
|
|
628
|
-
return null;
|
|
629
|
-
}
|
|
630
630
|
try {
|
|
631
631
|
result = require(pkgName);
|
|
632
632
|
if (persist && result) {
|
|
@@ -645,7 +645,7 @@ class Document extends core_1.Client {
|
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
647
|
try {
|
|
648
|
-
const source = result || this.readFile(value, { ownPermissionOnly: true, absolutePath: this.hasEval('absolute'), requireExt: true, encoding, cache }) || value;
|
|
648
|
+
const source = (result || this.readFile(value, { ownPermissionOnly: true, absolutePath: this.hasEval('absolute'), requireExt: true, encoding: (0, types_1.getEncoding)(encoding), cache })) || value;
|
|
649
649
|
if (typeof source !== 'string') {
|
|
650
650
|
result = source;
|
|
651
651
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/document",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.12",
|
|
4
4
|
"description": "Document constructor for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/core": "0.8.
|
|
24
|
-
"@e-mc/db": "0.8.
|
|
25
|
-
"@e-mc/types": "0.8.
|
|
23
|
+
"@e-mc/core": "0.8.12",
|
|
24
|
+
"@e-mc/db": "0.8.12",
|
|
25
|
+
"@e-mc/types": "0.8.12",
|
|
26
26
|
"chalk": "4.1.2",
|
|
27
27
|
"htmlparser2": "^9.1.0",
|
|
28
28
|
"js-yaml": "^4.1.0",
|