@zipadee/javascript 0.0.11 → 0.0.13
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/lib/serve.d.ts.map +1 -1
- package/lib/serve.js +125 -94
- package/lib/serve.js.map +1 -1
- package/package.json +4 -3
package/lib/serve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../src/lib/serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,UAAU,EAAC,MAAM,eAAe,CAAC;AAezD,MAAM,WAAW,OAAO;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC5B;AAYD;;GAEG;AACH,eAAO,MAAM,KAAK,SAAU,OAAO,KAAG,
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../src/lib/serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,UAAU,EAAC,MAAM,eAAe,CAAC;AAezD,MAAM,WAAW,OAAO;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC5B;AAYD;;GAEG;AACH,eAAO,MAAM,KAAK,SAAU,OAAO,KAAG,UAkIrC,CAAC"}
|
package/lib/serve.js
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import {HttpError} from '@zipadee/core';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
pathIsHidden,
|
|
5
|
-
resolvePath,
|
|
6
|
-
stat,
|
|
7
|
-
} from '@zipadee/static/lib/utils.js';
|
|
8
|
-
import {send} from '@zipadee/static';
|
|
1
|
+
import { HttpError } from '@zipadee/core';
|
|
2
|
+
import { decodePath, pathIsHidden, resolvePath, stat, } from '@zipadee/static/lib/utils.js';
|
|
3
|
+
import { send } from '@zipadee/static';
|
|
9
4
|
import fs from 'node:fs/promises';
|
|
10
5
|
import path from 'node:path';
|
|
11
|
-
import {parse, init} from 'es-module-lexer';
|
|
12
|
-
import {moduleResolve} from 'import-meta-resolve';
|
|
6
|
+
import { parse, init } from 'es-module-lexer';
|
|
7
|
+
import { moduleResolve } from 'import-meta-resolve';
|
|
13
8
|
await init;
|
|
14
9
|
// TODO:
|
|
15
10
|
// - Add caching for both specifier resolution and files
|
|
@@ -24,92 +19,128 @@ await init;
|
|
|
24
19
|
* Serve static JavaScript files from a `root` directory.
|
|
25
20
|
*/
|
|
26
21
|
export const serve = (opts) => {
|
|
27
|
-
|
|
28
|
-
opts.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
} else {
|
|
51
|
-
filePath = filePath.slice(parsedPath.root.length);
|
|
52
|
-
filePath = resolvePath(base, filePath);
|
|
53
|
-
}
|
|
54
|
-
if (pathIsHidden(root, filePath)) {
|
|
55
|
-
return await next();
|
|
56
|
-
}
|
|
57
|
-
const stats = await stat(filePath);
|
|
58
|
-
if (stats.isDirectory()) {
|
|
59
|
-
return await next();
|
|
60
|
-
}
|
|
61
|
-
if (!transform) {
|
|
62
|
-
const relativePath = path.relative(root, filePath);
|
|
63
|
-
await send(req, res, relativePath, {root});
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const source = await fs.readFile(filePath, 'utf8');
|
|
67
|
-
const [imports, _exports, _facade, _hasModuleSyntax] = parse(
|
|
68
|
-
source,
|
|
69
|
-
filePath,
|
|
70
|
-
);
|
|
71
|
-
let output = '';
|
|
72
|
-
let lastIndex = 0;
|
|
73
|
-
for (const impt of imports) {
|
|
74
|
-
const {t: type, s: start, e: end, n: unescaped} = impt;
|
|
75
|
-
if (type === 1) {
|
|
76
|
-
// Static import
|
|
77
|
-
const importSpecifier = unescaped || source.substring(start, end);
|
|
78
|
-
// If the specifier is relative or absolute, we don't need to resolve it
|
|
79
|
-
if (
|
|
80
|
-
importSpecifier.startsWith('.') ||
|
|
81
|
-
importSpecifier.startsWith('/')
|
|
82
|
-
) {
|
|
83
|
-
output += `${source.substring(lastIndex, start)}${importSpecifier}`;
|
|
84
|
-
lastIndex = end;
|
|
85
|
-
continue;
|
|
22
|
+
const root = opts.root === undefined ? process.cwd() : path.resolve(opts.root);
|
|
23
|
+
const base = opts.base === undefined ? root : resolvePath(root, opts.base);
|
|
24
|
+
const rootPathPrefix = opts.rootPathPrefix ?? '/__root__';
|
|
25
|
+
const extensions = opts.extensions ?? ['.js', '.mjs'];
|
|
26
|
+
const conditionsArray = opts.conditions ?? ['browser', 'import'];
|
|
27
|
+
const conditions = new Set(conditionsArray);
|
|
28
|
+
return async (req, res, next) => {
|
|
29
|
+
if (!(req.method === 'HEAD' || req.method === 'GET')) {
|
|
30
|
+
// TODO: implement HEAD?
|
|
31
|
+
return await next();
|
|
32
|
+
}
|
|
33
|
+
let filePath = decodePath(req.path);
|
|
34
|
+
const mountedPath = req.url.pathname.substring(0, req.url.pathname.length - filePath.length);
|
|
35
|
+
const parsedPath = path.parse(filePath);
|
|
36
|
+
const transform = extensions.includes(parsedPath.ext);
|
|
37
|
+
if (filePath.startsWith(rootPathPrefix)) {
|
|
38
|
+
filePath = filePath.substring(rootPathPrefix.length);
|
|
39
|
+
filePath = filePath.slice(parsedPath.root.length);
|
|
40
|
+
filePath = resolvePath(root, filePath);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
filePath = filePath.slice(parsedPath.root.length);
|
|
44
|
+
filePath = resolvePath(base, filePath);
|
|
86
45
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
importSpecifier,
|
|
90
|
-
fileURL,
|
|
91
|
-
conditions,
|
|
92
|
-
);
|
|
93
|
-
const resolvedImportPath = resolvedImportURL.pathname;
|
|
94
|
-
if (!resolvedImportPath.startsWith(root)) {
|
|
95
|
-
throw new HttpError(500);
|
|
46
|
+
if (pathIsHidden(root, filePath)) {
|
|
47
|
+
return await next();
|
|
96
48
|
}
|
|
97
|
-
|
|
98
|
-
if (
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
49
|
+
const stats = await stat(filePath);
|
|
50
|
+
if (stats.isDirectory()) {
|
|
51
|
+
return await next();
|
|
52
|
+
}
|
|
53
|
+
if (!transform) {
|
|
54
|
+
const relativePath = path.relative(root, filePath);
|
|
55
|
+
await send(req, res, relativePath, { root });
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const source = await fs.readFile(filePath, 'utf8');
|
|
59
|
+
const [imports, _exports, _facade, _hasModuleSyntax] = parse(source, filePath);
|
|
60
|
+
let output = '';
|
|
61
|
+
let lastIndex = 0;
|
|
62
|
+
for (const impt of imports) {
|
|
63
|
+
const { t: type, s: start, e: end, n: unescaped } = impt;
|
|
64
|
+
if (type === 1) {
|
|
65
|
+
// Static import
|
|
66
|
+
let importSpecifier = unescaped || source.substring(start, end);
|
|
67
|
+
let relativeImport = false;
|
|
68
|
+
let absoluteImport = false;
|
|
69
|
+
// If the specifier is relative or absolute, and has an extension,
|
|
70
|
+
// we don't need to resolve it
|
|
71
|
+
if (importSpecifier.startsWith('.') ||
|
|
72
|
+
importSpecifier.startsWith('/')) {
|
|
73
|
+
if (path.extname(importSpecifier) === '') {
|
|
74
|
+
// If we don't have an extension, we need to resolve it, but fix the
|
|
75
|
+
// resolved path to be relative to the current file
|
|
76
|
+
relativeImport = importSpecifier.startsWith('.');
|
|
77
|
+
absoluteImport = importSpecifier.startsWith('/');
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
output += `${source.substring(lastIndex, start)}${importSpecifier}`;
|
|
81
|
+
lastIndex = end;
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
const fileURL = new URL(filePath, 'file://');
|
|
86
|
+
if (absoluteImport) {
|
|
87
|
+
// If the import is absolute, we need to resolve it relative to the
|
|
88
|
+
// base path
|
|
89
|
+
importSpecifier = path.join(base, importSpecifier);
|
|
90
|
+
}
|
|
91
|
+
const resolvedImportURL = resolveImport(importSpecifier, fileURL, conditions, true);
|
|
92
|
+
const resolvedImportPath = resolvedImportURL.pathname;
|
|
93
|
+
if (!resolvedImportPath.startsWith(root)) {
|
|
94
|
+
throw new HttpError(500);
|
|
95
|
+
}
|
|
96
|
+
let resolvedimport;
|
|
97
|
+
if (relativeImport) {
|
|
98
|
+
resolvedimport = path.relative(path.dirname(filePath), resolvedImportPath);
|
|
99
|
+
if (!resolvedimport.startsWith('.')) {
|
|
100
|
+
resolvedimport = './' + resolvedimport;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
else if (resolvedImportPath.startsWith(base)) {
|
|
104
|
+
resolvedimport = resolvedImportPath.substring(base.length);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
resolvedimport = path.join(mountedPath, rootPathPrefix, resolvedImportPath.substring(root.length));
|
|
108
|
+
}
|
|
109
|
+
output += `${source.substring(lastIndex, start)}${resolvedimport}`;
|
|
110
|
+
lastIndex = end;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
res.type = 'text/javascript';
|
|
114
|
+
res.body = output + source.substring(lastIndex);
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Tries to resolve an import specifier with moduleResolve().
|
|
119
|
+
*
|
|
120
|
+
* When `tryExtensions` is true, if resolution fails and the specifier has no
|
|
121
|
+
* extension, it will try again with a '.js' extension.
|
|
122
|
+
*
|
|
123
|
+
* @param importSpecifier
|
|
124
|
+
* @param fileURL
|
|
125
|
+
* @param conditions
|
|
126
|
+
* @returns
|
|
127
|
+
*/
|
|
128
|
+
const resolveImport = (importSpecifier, fileURL, conditions, tryExtensions = false) => {
|
|
129
|
+
try {
|
|
130
|
+
return moduleResolve(importSpecifier, fileURL, conditions);
|
|
131
|
+
}
|
|
132
|
+
catch (e) {
|
|
133
|
+
if (tryExtensions &&
|
|
134
|
+
e.code === 'ERR_MODULE_NOT_FOUND' &&
|
|
135
|
+
path.extname(importSpecifier) === '') {
|
|
136
|
+
try {
|
|
137
|
+
return moduleResolve(importSpecifier + '.js', fileURL, conditions);
|
|
138
|
+
}
|
|
139
|
+
catch (innerError) {
|
|
140
|
+
throw e;
|
|
141
|
+
}
|
|
106
142
|
}
|
|
107
|
-
|
|
108
|
-
lastIndex = end;
|
|
109
|
-
}
|
|
143
|
+
throw e;
|
|
110
144
|
}
|
|
111
|
-
res.type = 'text/javascript';
|
|
112
|
-
res.body = output + source.substring(lastIndex);
|
|
113
|
-
};
|
|
114
145
|
};
|
|
115
|
-
//# sourceMappingURL=serve.js.map
|
|
146
|
+
//# sourceMappingURL=serve.js.map
|
package/lib/serve.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.js","sourceRoot":"","sources":["../src/lib/serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAkB,MAAM,eAAe,CAAC;AACzD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e,CAAC,KAAK,EAAE,EACpC,CAAC;YACD,IAAI,CAAC;gBACH,OAAO,aAAa,CAAC,eAAe,GAAG,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;YACrE,CAAC;YAAC,OAAO,UAAmB,EAAE,CAAC;gBAC7B,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC;QACD,MAAM,CAAC,CAAC;IACV,CAAC;AACH,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zipadee/javascript",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -56,8 +56,9 @@
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@zipadee/core": "^0.0.
|
|
60
|
-
"@zipadee/static": "^0.0.
|
|
59
|
+
"@zipadee/core": "^0.0.13",
|
|
60
|
+
"@zipadee/static": "^0.0.13",
|
|
61
|
+
"es-module-lexer": "^1.5.4",
|
|
61
62
|
"import-meta-resolve": "^4.1.0"
|
|
62
63
|
}
|
|
63
64
|
}
|