@e-mc/document 0.14.4 → 0.14.5
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/package.json +5 -5
- package/parse/index.js +1 -1
- package/parse/types/index.d.ts +1 -0
- package/transform/index.js +12 -0
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.14.
|
|
12
|
+
* [View Source](https://www.unpkg.com/@e-mc/types@0.14.5/lib/index.d.ts)
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { DataSource, ViewEngine } from "./squared";
|
|
@@ -188,14 +188,14 @@ NOTE: **@e-mc/document** is an abstract base class and cannot be instantiated. *
|
|
|
188
188
|
|
|
189
189
|
## References
|
|
190
190
|
|
|
191
|
-
- https://www.unpkg.com/@e-mc/types@0.14.
|
|
192
|
-
- https://www.unpkg.com/@e-mc/types@0.14.
|
|
193
|
-
- https://www.unpkg.com/@e-mc/types@0.14.
|
|
194
|
-
- https://www.unpkg.com/@e-mc/types@0.14.
|
|
195
|
-
- https://www.unpkg.com/@e-mc/types@0.14.
|
|
196
|
-
- https://www.unpkg.com/@e-mc/types@0.14.
|
|
197
|
-
- https://www.unpkg.com/@e-mc/types@0.14.
|
|
198
|
-
- https://www.unpkg.com/@e-mc/types@0.14.
|
|
191
|
+
- https://www.unpkg.com/@e-mc/types@0.14.5/lib/squared.d.ts
|
|
192
|
+
- https://www.unpkg.com/@e-mc/types@0.14.5/lib/asset.d.ts
|
|
193
|
+
- https://www.unpkg.com/@e-mc/types@0.14.5/lib/core.d.ts
|
|
194
|
+
- https://www.unpkg.com/@e-mc/types@0.14.5/lib/document.d.ts
|
|
195
|
+
- https://www.unpkg.com/@e-mc/types@0.14.5/lib/filemanager.d.ts
|
|
196
|
+
- https://www.unpkg.com/@e-mc/types@0.14.5/lib/logger.d.ts
|
|
197
|
+
- https://www.unpkg.com/@e-mc/types@0.14.5/lib/settings.d.ts
|
|
198
|
+
- https://www.unpkg.com/@e-mc/types@0.14.5/lib/watch.d.ts
|
|
199
199
|
|
|
200
200
|
## LICENSE
|
|
201
201
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/document",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.5",
|
|
4
4
|
"description": "Document constructor for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"license": "BSD-3-Clause",
|
|
17
17
|
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@e-mc/core": "0.14.
|
|
20
|
-
"@e-mc/db": "0.14.
|
|
21
|
-
"@e-mc/types": "0.14.
|
|
19
|
+
"@e-mc/core": "0.14.5",
|
|
20
|
+
"@e-mc/db": "0.14.5",
|
|
21
|
+
"@e-mc/types": "0.14.5",
|
|
22
22
|
"chalk": "4.1.2",
|
|
23
23
|
"domhandler": "^5.0.3",
|
|
24
24
|
"domutils": "^3.2.2",
|
|
25
25
|
"htmlparser2": "^10.1.0",
|
|
26
26
|
"js-yaml": "^4.2.0",
|
|
27
|
-
"picomatch": "^4.0.
|
|
27
|
+
"picomatch": "^4.0.5"
|
|
28
28
|
}
|
|
29
29
|
}
|
package/parse/index.js
CHANGED
|
@@ -22,7 +22,7 @@ const PATTERN_ATTRVALUE = `=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s>]*))`;
|
|
|
22
22
|
const PATTERN_TAGNAME = '[A-Za-z][\\w-]*';
|
|
23
23
|
const PATTERN_TAGOPEN = `(?:[^=>]|${PATTERN_ATTRVALUE})`;
|
|
24
24
|
const PATTERN_QUOTEVALUE = `(?:"[^"]+"|'[^']+')`;
|
|
25
|
-
const PATTERN_COMMENT = '/\\*[
|
|
25
|
+
const PATTERN_COMMENT = '/\\*[^*]*\\*+(?:[^/*][^*]*\\*+)*/';
|
|
26
26
|
const PATTERN_TRAILINGSPACE = '[ \\t]*((?:\\r?\\n)*)';
|
|
27
27
|
const REGEXP_ATTRNAME = new RegExp('\\s+' + PATTERN_ATTRNAME, 'g');
|
|
28
28
|
const REGEXP_ATTRVALUE = new RegExp(PATTERN_ATTRNAME + '\\s*' + PATTERN_ATTRVALUE, 'g');
|
package/parse/types/index.d.ts
CHANGED
|
@@ -148,6 +148,7 @@ export interface XmlWriterConstructor {
|
|
|
148
148
|
readonly PATTERN_TAGNAME: string;
|
|
149
149
|
readonly PATTERN_TAGOPEN: string;
|
|
150
150
|
readonly PATTERN_QUOTEVALUE: string;
|
|
151
|
+
/** @deprecated DomWriter */
|
|
151
152
|
readonly PATTERN_COMMENT: string;
|
|
152
153
|
readonly PATTERN_TRAILINGSPACE: string;
|
|
153
154
|
replaceMatch(match: RegExpMatchArray, source: string, pattern: RegExp): string;
|
package/transform/index.js
CHANGED
|
@@ -59,6 +59,7 @@ class TransformSeries extends Module {
|
|
|
59
59
|
#code;
|
|
60
60
|
#modulesDir = '';
|
|
61
61
|
#username = '';
|
|
62
|
+
#hasEval = null;
|
|
62
63
|
#sourceMap;
|
|
63
64
|
#out;
|
|
64
65
|
#options;
|
|
@@ -95,6 +96,11 @@ class TransformSeries extends Module {
|
|
|
95
96
|
if (instance.hasPermission('fs')) {
|
|
96
97
|
this.permission = Permission.clone(instance.permission, true);
|
|
97
98
|
}
|
|
99
|
+
try {
|
|
100
|
+
this.#hasEval = instance.hasEval.bind(instance);
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
}
|
|
98
104
|
this.abortable = instance.abortable;
|
|
99
105
|
this._moduleName = instance.moduleName + ':transform:' + this.type;
|
|
100
106
|
if (dirname) {
|
|
@@ -128,6 +134,12 @@ class TransformSeries extends Module {
|
|
|
128
134
|
}
|
|
129
135
|
return super.getTempDir(pathname, filename, createDir);
|
|
130
136
|
}
|
|
137
|
+
hasEval(name) {
|
|
138
|
+
if (this.#hasEval) {
|
|
139
|
+
return this.#hasEval(name);
|
|
140
|
+
}
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
131
143
|
toBaseConfig(all = true) {
|
|
132
144
|
const { outputConfig, external } = this;
|
|
133
145
|
const baseConfig = this.baseConfig;
|