@e-mc/document 0.10.13 → 0.10.15

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.10.13/lib/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.10.15/lib/index.d.ts)
13
13
 
14
14
  ```typescript
15
15
  import type { DataSource, ViewEngine } from "./squared";
@@ -183,14 +183,14 @@ NOTE: **@e-mc/document** is an abstract base class and cannot be instantiated. *
183
183
 
184
184
  ## References
185
185
 
186
- - https://www.unpkg.com/@e-mc/types@0.10.13/lib/squared.d.ts
187
- - https://www.unpkg.com/@e-mc/types@0.10.13/lib/asset.d.ts
188
- - https://www.unpkg.com/@e-mc/types@0.10.13/lib/core.d.ts
189
- - https://www.unpkg.com/@e-mc/types@0.10.13/lib/document.d.ts
190
- - https://www.unpkg.com/@e-mc/types@0.10.13/lib/filemanager.d.ts
191
- - https://www.unpkg.com/@e-mc/types@0.10.13/lib/logger.d.ts
192
- - https://www.unpkg.com/@e-mc/types@0.10.13/lib/settings.d.ts
193
- - https://www.unpkg.com/@e-mc/types@0.10.13/lib/watch.d.ts
186
+ - https://www.unpkg.com/@e-mc/types@0.10.15/lib/squared.d.ts
187
+ - https://www.unpkg.com/@e-mc/types@0.10.15/lib/asset.d.ts
188
+ - https://www.unpkg.com/@e-mc/types@0.10.15/lib/core.d.ts
189
+ - https://www.unpkg.com/@e-mc/types@0.10.15/lib/document.d.ts
190
+ - https://www.unpkg.com/@e-mc/types@0.10.15/lib/filemanager.d.ts
191
+ - https://www.unpkg.com/@e-mc/types@0.10.15/lib/logger.d.ts
192
+ - https://www.unpkg.com/@e-mc/types@0.10.15/lib/settings.d.ts
193
+ - https://www.unpkg.com/@e-mc/types@0.10.15/lib/watch.d.ts
194
194
 
195
195
  ## LICENSE
196
196
 
package/index.js CHANGED
@@ -1117,7 +1117,13 @@ class Document extends core_1.Client {
1117
1117
  }
1118
1118
  try {
1119
1119
  const name = target.name;
1120
- const context = require(name);
1120
+ let context;
1121
+ try {
1122
+ context = require(name);
1123
+ }
1124
+ catch {
1125
+ context = await (0, types_1.importESM)(name);
1126
+ }
1121
1127
  const { singleRow, options = {} } = target;
1122
1128
  let { compile, output } = options;
1123
1129
  if (!(0, types_1.isPlainObject)(output)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/document",
3
- "version": "0.10.13",
3
+ "version": "0.10.15",
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.10.13",
24
- "@e-mc/db": "0.10.13",
25
- "@e-mc/types": "0.10.13",
23
+ "@e-mc/core": "0.10.15",
24
+ "@e-mc/db": "0.10.15",
25
+ "@e-mc/types": "0.10.15",
26
26
  "chalk": "4.1.2",
27
27
  "domhandler": "^5.0.3",
28
28
  "domutils": "^3.1.0",