@e-mc/document 0.12.6 → 0.12.7

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 (3) hide show
  1. package/README.md +9 -9
  2. package/index.js +7 -1
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Interface
11
11
 
12
- * [View Source](https://www.unpkg.com/@e-mc/types@0.12.6/lib/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.12.7/lib/index.d.ts)
13
13
 
14
14
  ```typescript
15
15
  import type { DataSource, ViewEngine } from "./squared";
@@ -185,14 +185,14 @@ NOTE: **@e-mc/document** is an abstract base class and cannot be instantiated. *
185
185
 
186
186
  ## References
187
187
 
188
- - https://www.unpkg.com/@e-mc/types@0.12.6/lib/squared.d.ts
189
- - https://www.unpkg.com/@e-mc/types@0.12.6/lib/asset.d.ts
190
- - https://www.unpkg.com/@e-mc/types@0.12.6/lib/core.d.ts
191
- - https://www.unpkg.com/@e-mc/types@0.12.6/lib/document.d.ts
192
- - https://www.unpkg.com/@e-mc/types@0.12.6/lib/filemanager.d.ts
193
- - https://www.unpkg.com/@e-mc/types@0.12.6/lib/logger.d.ts
194
- - https://www.unpkg.com/@e-mc/types@0.12.6/lib/settings.d.ts
195
- - https://www.unpkg.com/@e-mc/types@0.12.6/lib/watch.d.ts
188
+ - https://www.unpkg.com/@e-mc/types@0.12.7/lib/squared.d.ts
189
+ - https://www.unpkg.com/@e-mc/types@0.12.7/lib/asset.d.ts
190
+ - https://www.unpkg.com/@e-mc/types@0.12.7/lib/core.d.ts
191
+ - https://www.unpkg.com/@e-mc/types@0.12.7/lib/document.d.ts
192
+ - https://www.unpkg.com/@e-mc/types@0.12.7/lib/filemanager.d.ts
193
+ - https://www.unpkg.com/@e-mc/types@0.12.7/lib/logger.d.ts
194
+ - https://www.unpkg.com/@e-mc/types@0.12.7/lib/settings.d.ts
195
+ - https://www.unpkg.com/@e-mc/types@0.12.7/lib/watch.d.ts
196
196
 
197
197
  ## LICENSE
198
198
 
package/index.js CHANGED
@@ -1115,7 +1115,13 @@ class Document extends core_1.Client {
1115
1115
  return '';
1116
1116
  }
1117
1117
  try {
1118
- const context = require(target.name);
1118
+ let context;
1119
+ try {
1120
+ context = require(target.name);
1121
+ }
1122
+ catch {
1123
+ context = await (0, types_1.importESM)(target.name);
1124
+ }
1119
1125
  const { compile, output } = target.options || {};
1120
1126
  if (this.settingsOf('view_engine', 'coerce') === true) {
1121
1127
  if (compile) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/document",
3
- "version": "0.12.6",
3
+ "version": "0.12.7",
4
4
  "description": "Document constructor for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -19,9 +19,9 @@
19
19
  "license": "BSD-3-Clause",
20
20
  "homepage": "https://github.com/anpham6/e-mc#readme",
21
21
  "dependencies": {
22
- "@e-mc/core": "0.12.6",
23
- "@e-mc/db": "0.12.6",
24
- "@e-mc/types": "0.12.6",
22
+ "@e-mc/core": "0.12.7",
23
+ "@e-mc/db": "0.12.7",
24
+ "@e-mc/types": "0.12.7",
25
25
  "chalk": "4.1.2",
26
26
  "domhandler": "^5.0.3",
27
27
  "domutils": "^3.2.2",