mam 1.11.962 → 1.11.963
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/node.d.ts +13 -13
- package/node.deps.json +1 -1
- package/node.js +12 -20
- package/node.js.map +1 -1
- package/node.mjs +12 -20
- package/node.test.js +12 -20
- package/node.test.js.map +1 -1
- package/package.json +3 -3
package/node.js
CHANGED
|
@@ -8662,6 +8662,18 @@ var $;
|
|
|
8662
8662
|
}
|
|
8663
8663
|
expressGenerator() { return this.sync_middleware(this.handleRequest.bind(this)); }
|
|
8664
8664
|
handleRequest(req, res) {
|
|
8665
|
+
if (req.path === '/.well-known/appspecific/com.chrome.devtools.json') {
|
|
8666
|
+
const file = this.build().root().resolve(req.path);
|
|
8667
|
+
if (file.exists())
|
|
8668
|
+
return false;
|
|
8669
|
+
file.text(JSON.stringify({
|
|
8670
|
+
workspace: {
|
|
8671
|
+
root: this.build().root().path(),
|
|
8672
|
+
uuid: $mol_dom.crypto.randomUUID(),
|
|
8673
|
+
},
|
|
8674
|
+
}, null, '\t'));
|
|
8675
|
+
return false;
|
|
8676
|
+
}
|
|
8665
8677
|
try {
|
|
8666
8678
|
// if( req.query._escaped_fragment_ ) {
|
|
8667
8679
|
// const fragment = decodeURIComponent( String( req.query._escaped_fragment_ ) )
|
|
@@ -8732,26 +8744,6 @@ var $;
|
|
|
8732
8744
|
const root = this.$.$mol_file.absolute(this.rootPublic());
|
|
8733
8745
|
const dir = root.resolve(req.path);
|
|
8734
8746
|
const path = dir.path();
|
|
8735
|
-
// Handle .well-known paths (browser/dev tools standard paths)
|
|
8736
|
-
if (req.path === '/.well-known/appspecific/com.chrome.devtools.json') {
|
|
8737
|
-
const root = this.build().root().path();
|
|
8738
|
-
const config = {
|
|
8739
|
-
version: 1,
|
|
8740
|
-
description: 'MAM ($mol) Framework DevTools Configuration',
|
|
8741
|
-
mappings: [
|
|
8742
|
-
{
|
|
8743
|
-
url: `http://localhost:${this.port()}/`,
|
|
8744
|
-
path: root,
|
|
8745
|
-
}
|
|
8746
|
-
]
|
|
8747
|
-
};
|
|
8748
|
-
res.writeHead(200, {
|
|
8749
|
-
'Content-Type': 'application/json',
|
|
8750
|
-
'Cache-Control': 'no-cache'
|
|
8751
|
-
});
|
|
8752
|
-
res.end(JSON.stringify(config, null, 2));
|
|
8753
|
-
return true;
|
|
8754
|
-
}
|
|
8755
8747
|
// ensure загружает сорцы, делает git pull, это не стоит делать на build-папках
|
|
8756
8748
|
// Поэтому регулярка выше отсеивает build-папки
|
|
8757
8749
|
this.ensure(path);
|