@zipadee/javascript 0.0.12 → 0.0.14
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/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/serve.d.ts +27 -27
- package/lib/serve.d.ts.map +1 -1
- package/lib/serve.js +120 -95
- package/lib/serve.js.map +1 -1
- package/package.json +5 -5
package/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './lib/serve.js';
|
|
2
|
-
//# sourceMappingURL=index.d.ts.map
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './lib/serve.js';
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/lib/serve.d.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import {type Middleware} from '@zipadee/core';
|
|
1
|
+
import { type Middleware } from '@zipadee/core';
|
|
2
2
|
export interface Options {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Root directory to restrict file access. Defaults to the current working
|
|
5
|
+
* directory.
|
|
6
|
+
*/
|
|
7
|
+
root?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Base path to resolve imports from. Defaults to the current working
|
|
10
|
+
* directory.
|
|
11
|
+
*/
|
|
12
|
+
base?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Imports resolved to outside of the base path will be prefixed with this
|
|
15
|
+
* string. Defaults to `/__root__`.
|
|
16
|
+
*/
|
|
17
|
+
rootPathPrefix?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Array of file extensions to transform. Defaults to `['.js', '.mjs']`.
|
|
20
|
+
*
|
|
21
|
+
* Other extensions are served as plain files.
|
|
22
|
+
*/
|
|
23
|
+
extensions?: Array<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Array of import conditions to support. Defaults to `['browser', 'import']`.
|
|
26
|
+
*/
|
|
27
|
+
conditions?: Array<string>;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Serve static JavaScript files from a `root` directory.
|
|
31
31
|
*/
|
|
32
32
|
export declare const serve: (opts: Options) => Middleware;
|
|
33
|
-
//# sourceMappingURL=serve.d.ts.map
|
|
33
|
+
//# sourceMappingURL=serve.d.ts.map
|
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;
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../src/lib/serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,UAAU,EAAC,MAAM,eAAe,CAAC;AAmBzD,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,UAgJrC,CAAC"}
|
package/lib/serve.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
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, type ErrnoException} from 'import-meta-resolve';
|
|
8
|
+
import resolve from 'enhanced-resolve';
|
|
9
|
+
import baseFS from 'fs';
|
|
10
|
+
const { CachedInputFileSystem, ResolverFactory } = resolve;
|
|
13
11
|
await init;
|
|
14
12
|
// TODO:
|
|
15
13
|
// - Add caching for both specifier resolution and files
|
|
@@ -24,92 +22,119 @@ await init;
|
|
|
24
22
|
* Serve static JavaScript files from a `root` directory.
|
|
25
23
|
*/
|
|
26
24
|
export const serve = (opts) => {
|
|
27
|
-
|
|
28
|
-
opts.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const parsedPath = path.parse(filePath);
|
|
45
|
-
const transform = extensions.includes(parsedPath.ext);
|
|
46
|
-
if (filePath.startsWith(rootPathPrefix)) {
|
|
47
|
-
filePath = filePath.substring(rootPathPrefix.length);
|
|
48
|
-
filePath = filePath.slice(parsedPath.root.length);
|
|
49
|
-
filePath = resolvePath(root, filePath);
|
|
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;
|
|
25
|
+
const root = opts.root === undefined ? process.cwd() : path.resolve(opts.root);
|
|
26
|
+
const base = opts.base === undefined ? root : resolvePath(root, opts.base);
|
|
27
|
+
const rootPathPrefix = opts.rootPathPrefix ?? '/__root__';
|
|
28
|
+
const extensions = opts.extensions ?? ['.js', '.mjs'];
|
|
29
|
+
const conditionsArray = opts.conditions ?? ['browser', 'import'];
|
|
30
|
+
// const conditions = new Set(conditionsArray);
|
|
31
|
+
const resolver = ResolverFactory.createResolver({
|
|
32
|
+
fileSystem: new CachedInputFileSystem(baseFS, 4000),
|
|
33
|
+
roots: [root, base],
|
|
34
|
+
extensions: ['.js', '.json'],
|
|
35
|
+
conditionNames: conditionsArray,
|
|
36
|
+
mainFields: ['module', 'browser', 'main'],
|
|
37
|
+
});
|
|
38
|
+
return async (req, res, next) => {
|
|
39
|
+
if (!(req.method === 'HEAD' || req.method === 'GET')) {
|
|
40
|
+
// TODO: implement HEAD?
|
|
41
|
+
return await next();
|
|
86
42
|
}
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
throw new HttpError(500);
|
|
43
|
+
let filePath = decodePath(req.path);
|
|
44
|
+
const mountedPath = req.url.pathname.substring(0, req.url.pathname.length - filePath.length);
|
|
45
|
+
const parsedPath = path.parse(filePath);
|
|
46
|
+
const transform = extensions.includes(parsedPath.ext);
|
|
47
|
+
if (filePath.startsWith(rootPathPrefix)) {
|
|
48
|
+
filePath = filePath.substring(rootPathPrefix.length);
|
|
49
|
+
filePath = filePath.slice(parsedPath.root.length);
|
|
50
|
+
filePath = resolvePath(root, filePath);
|
|
96
51
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
} else {
|
|
101
|
-
resolvedimport = path.join(
|
|
102
|
-
mountedPath,
|
|
103
|
-
rootPathPrefix,
|
|
104
|
-
resolvedImportPath.substring(root.length),
|
|
105
|
-
);
|
|
52
|
+
else {
|
|
53
|
+
filePath = filePath.slice(parsedPath.root.length);
|
|
54
|
+
filePath = resolvePath(base, filePath);
|
|
106
55
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
56
|
+
if (pathIsHidden(root, filePath)) {
|
|
57
|
+
return await next();
|
|
58
|
+
}
|
|
59
|
+
const stats = await stat(filePath);
|
|
60
|
+
if (stats.isDirectory()) {
|
|
61
|
+
return await next();
|
|
62
|
+
}
|
|
63
|
+
if (!transform) {
|
|
64
|
+
const relativePath = path.relative(root, filePath);
|
|
65
|
+
await send(req, res, relativePath, { root });
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const source = await fs.readFile(filePath, 'utf8');
|
|
69
|
+
const [imports, _exports, _facade, _hasModuleSyntax] = parse(source, filePath);
|
|
70
|
+
let output = '';
|
|
71
|
+
let lastIndex = 0;
|
|
72
|
+
for (const impt of imports) {
|
|
73
|
+
const { t: type, s: start, e: end, n: unescaped } = impt;
|
|
74
|
+
if (type === 1) {
|
|
75
|
+
// Static import
|
|
76
|
+
let importSpecifier = unescaped || source.substring(start, end);
|
|
77
|
+
let relativeImport = false;
|
|
78
|
+
let absoluteImport = false;
|
|
79
|
+
// If the specifier is relative or absolute, and has an extension,
|
|
80
|
+
// we don't need to resolve it
|
|
81
|
+
if (importSpecifier.startsWith('.') ||
|
|
82
|
+
importSpecifier.startsWith('/')) {
|
|
83
|
+
if (path.extname(importSpecifier) === '') {
|
|
84
|
+
// If we don't have an extension, we need to resolve it, but fix the
|
|
85
|
+
// resolved path to be relative to the current file
|
|
86
|
+
relativeImport = importSpecifier.startsWith('.');
|
|
87
|
+
absoluteImport = importSpecifier.startsWith('/');
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
output += `${source.substring(lastIndex, start)}${importSpecifier}`;
|
|
91
|
+
lastIndex = end;
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const fileURL = new URL(filePath, 'file://');
|
|
96
|
+
if (absoluteImport) {
|
|
97
|
+
// If the import is absolute, we need to resolve it relative to the
|
|
98
|
+
// base path
|
|
99
|
+
importSpecifier = path.join(base, importSpecifier);
|
|
100
|
+
}
|
|
101
|
+
const resolveFromPath = path.dirname(filePath);
|
|
102
|
+
const resolvedImportURL = await new Promise((res, rej) => {
|
|
103
|
+
resolver.resolve({}, resolveFromPath, importSpecifier, {}, (err, result) => {
|
|
104
|
+
if (err) {
|
|
105
|
+
rej(err);
|
|
106
|
+
}
|
|
107
|
+
else if (result === undefined || result === false) {
|
|
108
|
+
rej(new Error('Could not resolve import'));
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
res(new URL(result, fileURL));
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
const resolvedImportPath = resolvedImportURL.pathname;
|
|
116
|
+
if (!resolvedImportPath.startsWith(root)) {
|
|
117
|
+
throw new HttpError(500);
|
|
118
|
+
}
|
|
119
|
+
let resolvedimport;
|
|
120
|
+
if (relativeImport) {
|
|
121
|
+
resolvedimport = path.relative(path.dirname(filePath), resolvedImportPath);
|
|
122
|
+
if (!resolvedimport.startsWith('.')) {
|
|
123
|
+
resolvedimport = './' + resolvedimport;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
else if (resolvedImportPath.startsWith(base)) {
|
|
127
|
+
resolvedimport = resolvedImportPath.substring(base.length);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
resolvedimport = path.join(mountedPath, rootPathPrefix, resolvedImportPath.substring(root.length));
|
|
131
|
+
}
|
|
132
|
+
output += `${source.substring(lastIndex, start)}${resolvedimport}`;
|
|
133
|
+
lastIndex = end;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
res.type = 'text/javascript';
|
|
137
|
+
res.body = output + source.substring(lastIndex);
|
|
138
|
+
};
|
|
114
139
|
};
|
|
115
|
-
//# sourceMappingURL=serve.js.map
|
|
140
|
+
//# 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,OAAO,EACL,UAAU,EACV,YAAY,EAC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AAc,GAAG,kBAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC7D,CAAC;qBAAM,CAAC;oBACN,cAAc,GAAG,IAAI,CAAC,IAAI,CACxB,WAAW,EACX,cAAc,EACd,kBAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAC1C,CAAC;gBACJ,CAAC;gBAED,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG,cAAc,EAAE,CAAC;gBACnE,SAAS,GAAG,GAAG,CAAC;YAClB,CAAC;QACH,CAAC;QAED,GAAG,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC7B,GAAG,CAAC,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC,CAAC;AACJ,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.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@zipadee/core": "^0.0.
|
|
60
|
-
"@zipadee/static": "^0.0.
|
|
61
|
-
"
|
|
62
|
-
"
|
|
59
|
+
"@zipadee/core": "^0.0.14",
|
|
60
|
+
"@zipadee/static": "^0.0.14",
|
|
61
|
+
"enhanced-resolve": "^5.17.1",
|
|
62
|
+
"es-module-lexer": "^1.5.4"
|
|
63
63
|
}
|
|
64
64
|
}
|