@rainbow-robotics/preview-host 1.10.3-dev.0 → 1.10.3-dev.2
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/dist/assets/{__federation_expose_App.SnDQaVWF.js → __federation_expose_App.BcKopQK3.js} +274 -274
- package/dist/assets/{cssMode.BMih__rD.js → cssMode.TQiMpZrg.js} +1 -1
- package/dist/assets/{freemarker2.DC5Bsvwq.js → freemarker2.DbolQG0W.js} +1 -1
- package/dist/assets/{handlebars.BJ5gVGRl.js → handlebars.BN8p09Qr.js} +1 -1
- package/dist/assets/{html.CmYW8yYx.js → html.tlNvU0m7.js} +1 -1
- package/dist/assets/{htmlMode.DhN5zWqE.js → htmlMode.PdnlViXL.js} +1 -1
- package/dist/assets/{index.DIDgv_ph.js → index.BddoWb3-.js} +1 -1
- package/dist/assets/{index.BeiJ-a8H.js → index.CyLeIbBs.js} +6 -6
- package/dist/assets/{javascript.DA0cW-3s.js → javascript.KlHHiAmd.js} +1 -1
- package/dist/assets/{jsonMode.ErYDHAjl.js → jsonMode.BKWXxzrb.js} +1 -1
- package/dist/assets/{liquid.DqFw7tdw.js → liquid.Dhh4R480.js} +1 -1
- package/dist/assets/{lspLanguageFeatures.kDn-df_L.js → lspLanguageFeatures.CcelPyIj.js} +1 -1
- package/dist/assets/{mdx.DSDHlE6d.js → mdx.BZ2TO2U9.js} +1 -1
- package/dist/assets/{python.Bzg3UZzP.js → python.bwQQUg46.js} +1 -1
- package/dist/assets/{razor.ntIcJd8C.js → razor.DBishBMi.js} +1 -1
- package/dist/assets/remoteEntry.js +1 -1
- package/dist/assets/{tsMode.BI2mVLGJ.js → tsMode.C1-reqV1.js} +1 -1
- package/dist/assets/{typescript.DMn_nMRU.js → typescript.BEEY2Nts.js} +1 -1
- package/dist/assets/{useFileDownload.Bb9T7iGO.js → useFileDownload.Cbk5Bf_C.js} +198 -198
- package/dist/assets/{xml.RFyHm9pH.js → xml.B87S4wD8.js} +1 -1
- package/dist/assets/{yaml.NC3LTkDx.js → yaml.CsjBCiTN.js} +1 -1
- package/dist/index.html +3 -3
- package/package.json +1 -1
- package/serve.mjs +30 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./__federation_expose_App.
|
|
1
|
+
import{l as e}from"./__federation_expose_App.BcKopQK3.js";const n={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},o={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};export{n as conf,o as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./__federation_expose_App.
|
|
1
|
+
import{l as e}from"./__federation_expose_App.BcKopQK3.js";const t={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},o={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{t as conf,o as language};
|
package/dist/index.html
CHANGED
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Rainbow Robotics System</title>
|
|
8
8
|
<script type="importmap">{"imports":{"react":"/plugin-shared/react.js","react/jsx-runtime":"/plugin-shared/react_jsx-runtime.js","react/jsx-dev-runtime":"/plugin-shared/react_jsx-dev-runtime.js","react-dom":"/plugin-shared/react-dom.js","react-dom/client":"/plugin-shared/react-dom_client.js","@rainbow-robotics/plugin-ui/react":"/plugin-shared/plugin-ui_react.js","@rainbow-robotics/plugin-ui/sdk":"/plugin-shared/plugin-ui_sdk.js","@rainbow-robotics/plugin-ui/host-ui":"/plugin-shared/plugin-ui_host-ui.js","@rainbow-robotics/plugin-ui/ws":"/plugin-shared/plugin-ui_ws.js"}}</script>
|
|
9
|
-
<script type="module" crossorigin src="/assets/index.
|
|
9
|
+
<script type="module" crossorigin src="/assets/index.BddoWb3-.js"></script>
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/__federation_fn_import.DdkEuT6t.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/index.P6snMalu.js">
|
|
12
12
|
<link rel="modulepreload" crossorigin href="/assets/jsx-runtime.CBqCNPYB.js">
|
|
13
13
|
<link rel="modulepreload" crossorigin href="/assets/emotion-styled-base.browser.esm.BIcjgOzg.js">
|
|
14
14
|
<link rel="modulepreload" crossorigin href="/assets/RbLocalizationProvider.BX3b4qG3.js">
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/index.B3zY1kf7.js">
|
|
16
|
-
<link rel="modulepreload" crossorigin href="/assets/useFileDownload.
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/assets/useFileDownload.Cbk5Bf_C.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/index.Bah31zT_.js">
|
|
18
|
-
<link rel="modulepreload" crossorigin href="/assets/__federation_expose_App.
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/assets/__federation_expose_App.BcKopQK3.js">
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
package/package.json
CHANGED
package/serve.mjs
CHANGED
|
@@ -128,10 +128,34 @@ function tryServe(res, baseDir, relPath, opts) {
|
|
|
128
128
|
// kit's S3 copy on first use and kept in ~/.muscat-pk/models, so the 3D robot view works with any
|
|
129
129
|
// robot or a local core SW, and offline once a model has been seen.
|
|
130
130
|
// ponytail: cached by path only; a changed model needs ~/.muscat-pk/models cleared.
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
// Tried in order: the kit's S3 copy, then the assets server (:5177) of the robot / local Muscat,
|
|
132
|
+
// which has the models that Muscat ships — so a model missing from S3 (or no internet) still shows.
|
|
133
|
+
const MODEL_SOURCES = [
|
|
134
|
+
...new Set([
|
|
135
|
+
process.env.MUSCAT_PK_MODELS_URL || "https://rainbow-deploy.s3.ap-northeast-2.amazonaws.com/muscat-plugin-kit/models",
|
|
136
|
+
...(robotHost ? [`http://${robotHost}:5177/models`] : []),
|
|
137
|
+
"http://localhost:5177/models",
|
|
138
|
+
]),
|
|
139
|
+
];
|
|
133
140
|
const MODELS_CACHE = resolve(homedir(), ".muscat-pk", "models");
|
|
134
141
|
|
|
142
|
+
const unreachable = new Set(); // a source that didn't answer is skipped from then on
|
|
143
|
+
|
|
144
|
+
async function fetchModel(rel) {
|
|
145
|
+
const path = rel.split("/").map(encodeURIComponent).join("/");
|
|
146
|
+
for (const base of MODEL_SOURCES) {
|
|
147
|
+
if (unreachable.has(base)) continue;
|
|
148
|
+
try {
|
|
149
|
+
const r = await fetch(`${base}/${path}`, { signal: AbortSignal.timeout(15_000) });
|
|
150
|
+
// S3 answers 403 for a missing key; a web server may answer 200 with an HTML fallback page.
|
|
151
|
+
if (r.ok && !(r.headers.get("content-type") ?? "").startsWith("text/html")) return Buffer.from(await r.arrayBuffer());
|
|
152
|
+
} catch {
|
|
153
|
+
unreachable.add(base);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
|
|
135
159
|
async function serveModel(res, url) {
|
|
136
160
|
const rel = decodeURIComponent(url.slice("/models/".length));
|
|
137
161
|
const file = resolve(MODELS_CACHE, rel);
|
|
@@ -141,16 +165,15 @@ async function serveModel(res, url) {
|
|
|
141
165
|
return;
|
|
142
166
|
}
|
|
143
167
|
if (!existsSync(file)) {
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
res.statusCode = r.ok || r.status === 403 ? 404 : r.status;
|
|
168
|
+
const data = await fetchModel(rel);
|
|
169
|
+
if (!data) {
|
|
170
|
+
res.statusCode = 404;
|
|
148
171
|
res.end(`model file not found: ${rel}`);
|
|
149
172
|
return;
|
|
150
173
|
}
|
|
151
174
|
mkdirSync(dirname(file), { recursive: true });
|
|
152
175
|
const part = `${file}.${process.pid}.part`;
|
|
153
|
-
writeFileSync(part,
|
|
176
|
+
writeFileSync(part, data);
|
|
154
177
|
renameSync(part, file);
|
|
155
178
|
}
|
|
156
179
|
sendFile(res, file);
|