desi76-uis 0.1.0 → 0.1.4

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.
Files changed (47) hide show
  1. package/README.md +6 -16
  2. package/dist/desi76-uis.js +7 -166
  3. package/dist/public/_app/immutable/chunks/BKdNeMqa.js +1 -0
  4. package/dist/public/_app/immutable/chunks/BNjcc32Y.js +1 -0
  5. package/dist/public/_app/immutable/chunks/BOrZJ9wv.js +1 -0
  6. package/dist/public/_app/immutable/chunks/BxJOUYDg.js +212 -0
  7. package/dist/public/_app/immutable/chunks/CEHVxybU.js +1 -0
  8. package/dist/public/_app/immutable/chunks/CK7by8jY.js +7 -0
  9. package/dist/public/_app/immutable/chunks/CWj6FrbW.js +1 -0
  10. package/dist/public/_app/immutable/chunks/CfOtT4kq.js +3 -0
  11. package/dist/public/_app/immutable/chunks/CkvDUNFw.js +1 -0
  12. package/dist/public/_app/immutable/chunks/DS7v80KP.js +1 -0
  13. package/dist/public/_app/immutable/chunks/fGd2jOqN.js +1 -0
  14. package/dist/public/_app/immutable/entry/app.C55m83Nl.js +2 -0
  15. package/dist/public/_app/immutable/entry/start.CcMSN52c.js +1 -0
  16. package/dist/public/_app/immutable/nodes/0.BqRHARdi.js +2 -0
  17. package/dist/public/_app/immutable/nodes/1.C44HVQn_.js +1 -0
  18. package/dist/public/_app/immutable/nodes/2.r7UppAc0.js +1 -0
  19. package/dist/public/_app/immutable/nodes/3.DW-iX7zv.js +10 -0
  20. package/dist/public/_app/version.json +1 -1
  21. package/dist/public/desi76/catamaran.html +23 -23
  22. package/dist/public/desi76/voila.html +21 -21
  23. package/dist/public/index.html +19 -19
  24. package/dist/public/pgdsvg/catamaran_front.svg +1 -0
  25. package/dist/public/pgdsvg/catamaran_side.svg +1 -1
  26. package/dist/public/pgdsvg/catamaran_top.svg +1 -1
  27. package/dist/public/pgdsvg/src_catamaran.svg +4 -1
  28. package/dist/public/pgdsvg/src_voila.svg +1 -1
  29. package/dist/public/pgdsvg/voila_face.svg +1 -1
  30. package/package.json +13 -19
  31. package/dist/public/_app/immutable/chunks/B-ZTy0gg.js +0 -1
  32. package/dist/public/_app/immutable/chunks/BYbF838I.js +0 -1
  33. package/dist/public/_app/immutable/chunks/BZsvGJWw.js +0 -1
  34. package/dist/public/_app/immutable/chunks/BhS90wtR.js +0 -1
  35. package/dist/public/_app/immutable/chunks/Ck7e11Sb.js +0 -1
  36. package/dist/public/_app/immutable/chunks/CtrJqhXS.js +0 -212
  37. package/dist/public/_app/immutable/chunks/D8wQZVGn.js +0 -1
  38. package/dist/public/_app/immutable/chunks/blLzobSh.js +0 -3
  39. package/dist/public/_app/immutable/chunks/pT_wVsUB.js +0 -1
  40. package/dist/public/_app/immutable/chunks/pwM9CY2M.js +0 -1
  41. package/dist/public/_app/immutable/chunks/uOOjmrfb.js +0 -7
  42. package/dist/public/_app/immutable/entry/app.DTHaFLCu.js +0 -2
  43. package/dist/public/_app/immutable/entry/start.DN2omQx6.js +0 -1
  44. package/dist/public/_app/immutable/nodes/0.eCzLwhCd.js +0 -2
  45. package/dist/public/_app/immutable/nodes/1.Cn7GLDrN.js +0 -1
  46. package/dist/public/_app/immutable/nodes/2.CXAkwJnP.js +0 -1
  47. package/dist/public/_app/immutable/nodes/3.BP7YMb9t.js +0 -10
package/README.md CHANGED
@@ -1,18 +1,20 @@
1
- desi76-uis
1
+ Desi76-uis
2
2
  ==========
3
3
 
4
4
 
5
5
  Presentation
6
6
  ------------
7
7
 
8
- *desi76-uis* is the static web-server of the web-app *desi76-ui*.
8
+ *desi76-uis* is the mini-server package for enabling the local installation of the web-ui *desi76-ui*.
9
+
10
+ Usually, this mini-server package desi76-uis is part of a mono-repo containing an other package for the web-ui and potentially an *universal* library backing the web-ui.
9
11
 
10
12
 
11
13
  Requirements
12
14
  ------------
13
15
 
14
- - [node](https://nodejs.org) > 20.10.0
15
- - [npm](https://docs.npmjs.com/cli) > 10.1.0
16
+ - [node](https://nodejs.org) > 22.0.0
17
+ - [npm](https://docs.npmjs.com/cli) > 11.0.0
16
18
 
17
19
 
18
20
  Installation
@@ -41,15 +43,3 @@ npx --package=desi76-uis desi76-uis
41
43
  npx --package=desi76-uis desi76-uis --help
42
44
  ```
43
45
 
44
-
45
- Development
46
- -----------
47
-
48
- ```bash
49
- git clone https://github.com/MYNAME/parame76
50
- cd parame76
51
- npm install
52
- npm run ci
53
- npm -w desi76-uis run run
54
- ```
55
-
@@ -1,172 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/desi76-uis.ts
4
- import yargs from "yargs";
5
- import { hideBin } from "yargs/helpers";
6
- import fs from "fs";
4
+ import { feli_cli } from "feli";
7
5
  import process from "process";
8
- import express from "express";
9
- import open from "open";
10
- import getport from "get-port";
11
-
12
- // package.json
13
- var package_default = {
14
- name: "desi76-uis",
15
- description: "mini-server for the web-app desi76-ui",
16
- version: "0.1.0",
17
- private: false,
18
- repository: {
19
- type: "git",
20
- url: "git+https://github.com/MYNAME/parame76.git"
21
- },
22
- homepage: "https://MYNAME.github.io/parame76/",
23
- author: "MYNAME",
24
- license: "ISC",
25
- keywords: [
26
- "parametrix",
27
- "3D",
28
- "CAD"
29
- ],
30
- type: "module",
31
- exports: {
32
- ".": {
33
- types: "./dist/desi76-uis.d.ts",
34
- default: "./dist/desi76-uis.js"
35
- }
36
- },
37
- bin: "dist/desi76-uis.js",
38
- files: [
39
- "dist/",
40
- "!dist/**/*.d.ts",
41
- "!dist/**/*.map",
42
- "!dist/**/*.test.*",
43
- "!dist/**/*.spec.*"
44
- ],
45
- engines: {
46
- node: ">=20.10.0"
47
- },
48
- tsup: {
49
- entry: [
50
- "src/desi76-uis.ts"
51
- ],
52
- format: "esm",
53
- splitting: false,
54
- dts: false,
55
- sourcemap: false,
56
- clean: true
57
- },
58
- prettier: {
59
- useTabs: true,
60
- singleQuote: true,
61
- trailingComma: "none",
62
- printWidth: 100,
63
- plugins: [],
64
- overrides: []
65
- },
66
- scripts: {
67
- dev: "tsup --watch",
68
- build: "tsup",
69
- check: "tsc --noEmit",
70
- pretty: "prettier --check .",
71
- format: "prettier --write .",
72
- lint: "eslint .",
73
- "test:unit": "vitest",
74
- "test:unit:once": "vitest --run",
75
- clean_public: "rimraf dist/public",
76
- copy_ui: "fse copy ../desi76-ui/build dist/public",
77
- checkCopy: "ls -l dist/public/index.html",
78
- copy_public: "run-s clean_public copy_ui checkCopy",
79
- ci: "run-s check build pretty lint test:unit:once copy_public",
80
- run: "node dist/desi76-uis.js",
81
- "run-help": "node dist/desi76-uis.js --help",
82
- clean: "rimraf node_modules build dist tmp"
83
- },
84
- dependencies: {
85
- express: "^5.1.0",
86
- "fs-extra": "^11.3.0",
87
- "get-port": "^7.1.0",
88
- open: "^10.1.2",
89
- yargs: "^18.0.0"
90
- },
91
- devDependencies: {
92
- "@atao60/fse-cli": "^0.1.9",
93
- "@eslint/js": "^9.10.0",
94
- "@types/eslint__js": "^8.42.3",
95
- "@types/express": "^5.0.3",
96
- "@types/fs-extra": "^11.0.4",
97
- "@types/yargs": "^17.0.33",
98
- eslint: "^9.29.0",
99
- "eslint-config-prettier": "^10.1.5",
100
- "npm-run-all2": "^8.0.4",
101
- prettier: "^3.5.3",
102
- rimraf: "^6.0.1",
103
- tsup: "^8.5.0",
104
- typescript: "^5.8.3",
105
- "typescript-eslint": "^8.34.1",
106
- vitest: "^3.2.3"
107
- }
108
- };
109
-
110
- // src/desi76-uis.ts
6
+ import path from "path";
111
7
  var scrDir = import.meta.dirname;
112
- function sleep(ms) {
113
- return new Promise((resolve) => setTimeout(resolve, ms));
114
- }
115
- async function mini_server(aDirectory, aBrowser, aPort) {
116
- const chost = "127.0.0.1";
117
- if (aDirectory !== "") {
118
- if (!fs.existsSync(aDirectory)) {
119
- console.error(`ERR339: Error, the path ${aDirectory} doesn't exist!`);
120
- process.exit(-1);
121
- }
122
- }
123
- let portnumber = aPort;
124
- if (portnumber === 0) {
125
- portnumber = await getport();
126
- }
127
- const app = express();
128
- if (aDirectory !== "") {
129
- app.use(express.static(aDirectory));
130
- }
131
- app.listen(portnumber, chost, () => {
132
- console.log(
133
- `${package_default.name} serves on port ${portnumber} for host ${chost} the directory:
134
- ${aDirectory} ...`
135
- );
136
- });
137
- await sleep(1e3);
138
- const url = `http://localhost:${portnumber}`;
139
- if (aBrowser) {
140
- console.log(`Your browser should open automatically at ${url}`);
141
- await open(url);
142
- } else {
143
- console.log(`Please, open the browser at ${url}`);
144
- }
145
- console.log("Press ctrl-c to stop this http-server ...");
146
- }
147
- async function mini_cli(argv) {
148
- const args = await yargs(hideBin(argv)).version(package_default.version).usage("Usage: $0 --port <port> --directoy <directory-path>").example([
149
- [
150
- "$0 -p 2022 -d MyPublic",
151
- "run the webserver on port 2022 and serve the content of the folder MyPublic"
152
- ]
153
- ]).option("directory", {
154
- alias: "d",
155
- type: "string",
156
- description: "path to the directory to be served.",
157
- //default: `${__dirname}/webui`,
158
- default: `${scrDir}/public`
159
- }).option("browser", {
160
- alias: "b",
161
- type: "boolean",
162
- description: "Open the browser at the corresponding URL.",
163
- default: true
164
- }).option("port", {
165
- alias: "p",
166
- type: "number",
167
- description: "port-number used by this web-server. If set to 0 an available port-number is automatically selected",
168
- default: 0
169
- }).strict().parseAsync();
170
- await mini_server(args.directory, args.browser, args.port);
8
+ var defaultPublicDir = path.join(scrDir, "public");
9
+ try {
10
+ await feli_cli(defaultPublicDir, process.argv);
11
+ } catch (err) {
12
+ console.error(`Error from feli: ${err}`);
171
13
  }
172
- await mini_cli(process.argv);
@@ -0,0 +1 @@
1
+ import{l as o,u as v,g as n,h as f,i as y,j as b,k as _,m as d,n as c,o as x,q as h,v as C,w as k,x as S,y as w,z as A,A as j,B as z}from"./fGd2jOqN.js";import{c as D}from"./BOrZJ9wv.js";function E(){var t;return f===null&&y(),((t=f).ac??(t.ac=new AbortController)).signal}function p(t){n===null&&o(),d&&n.l!==null?u(n).m.push(t):v(()=>{const e=c(t);if(typeof e=="function")return e})}function M(t){n===null&&o(),p(()=>()=>c(t))}function O(t,e,{bubbles:s=!1,cancelable:l=!1}={}){return new CustomEvent(t,{detail:e,bubbles:s,cancelable:l})}function P(){const t=n;return t===null&&o(),(e,s,l)=>{var r;const a=(r=t.s.$$events)==null?void 0:r[e];if(a){const m=b(a)?a.slice():[a],i=O(e,s,l);for(const g of m)g.call(t.x,i);return!i.defaultPrevented}return!0}}function U(t){n===null&&o(),n.l===null&&_(),u(n).b.push(t)}function $(t){n===null&&o(),n.l===null&&_(),u(n).a.push(t)}function u(t){var e=t.l;return e.u??(e.u={a:[],b:[],m:[]})}const R=Object.freeze(Object.defineProperty({__proto__:null,afterUpdate:$,beforeUpdate:U,createEventDispatcher:P,createRawSnippet:D,flushSync:x,getAbortSignal:E,getAllContexts:h,getContext:C,hasContext:k,hydrate:S,mount:w,onDestroy:M,onMount:p,setContext:A,tick:j,unmount:z,untrack:c},Symbol.toStringTag,{value:"Module"}));export{M as a,p as o,R as s};
@@ -0,0 +1 @@
1
+ import{C as B,D as E,E as M,I as q,V as C,W as Z,X as $,Y as F,Z as H,_ as N,$ as O,J as L,a0 as D,a1 as m,M as w,a2 as y,a3 as z,n as Y,a4 as G,a5 as U,a6 as J,a7 as V,a8 as W,P as R,U as X,a9 as j,aa as K,ab as Q,ac as k,m as p,ad as x,ae as aa,af as ra,ag as sa}from"./fGd2jOqN.js";function na(a,r,[f,i]=[0,0]){E&&f===0&&M();var e=a,s=null,v=null,t=m,S=f>0?q:0,I=!1;const d=(l,_=!0)=>{I=!0,P(_,l)},P=(l,_)=>{if(t===(t=l))return;let c=!1;if(E&&i!==-1){if(f===0){const u=C(e);u===Z?i=0:u===$?i=1/0:(i=parseInt(u.substring(1)),i!==i&&(i=t?1/0:-1))}const A=i>f;!!t===A&&(e=F(),H(e),N(!1),c=!0,i=-1)}t?(s?O(s):_&&(s=L(()=>_(e))),v&&D(v,()=>{v=null})):(v?O(v):_&&(v=L(()=>_(e,[f+1,i]))),s&&D(s,()=>{s=null})),c&&N(!0)};B(()=>{I=!1,r(d),I||P(null,null)},S),E&&(e=w)}function o(a,r){return a===r||(a==null?void 0:a[U])===r}function ta(a={},r,f,i){return y(()=>{var e,s;return z(()=>{e=s,s=[],Y(()=>{a!==f(...s)&&(r(a,...s),e&&o(f(...e),a)&&r(null,...e))})}),()=>{G(()=>{s&&o(f(...s),a)&&r(null,...s)})}}),a}let g=!1;function ea(a){var r=g;try{return g=!1,[a(),g]}finally{g=r}}function ia(a){var r;return((r=a.ctx)==null?void 0:r.d)??!1}function ua(a,r,f,i){var b;var e=!p||(f&x)!==0,s=(f&k)!==0,v=(f&ra)!==0,t=i,S=!0,I=()=>(S&&(S=!1,t=v?Y(i):i),t),d;if(s){var P=U in a||sa in a;d=((b=J(a,r))==null?void 0:b.set)??(P&&r in a?n=>a[r]=n:void 0)}var l,_=!1;s?[l,_]=ea(()=>a[r]):l=a[r],l===void 0&&i!==void 0&&(l=I(),d&&(e&&V(),d(l)));var c;if(e?c=()=>{var n=a[r];return n===void 0?I():(S=!0,n)}:c=()=>{var n=a[r];return n!==void 0&&(t=void 0),n===void 0?t:n},e&&(f&W)===0)return c;if(d){var A=a.$$legacy;return function(n,T){return arguments.length>0?((!e||!T||A||_)&&d(T?c():n),n):c()}}var u=((f&aa)!==0?X:j)(c);return s&&R(u),function(n,T){if(arguments.length>0){const h=T?R(u):e&&s?K(n):n;return Q(u,h),t!==void 0&&(t=h),n}return ia(u)?u.v:R(u)}}export{ta as b,na as i,ua as p};
@@ -0,0 +1 @@
1
+ import{C as _,D as i,E as d,F as l,G as u,H as h,I as m,J as v,K as y,L as g,M as c,N as E}from"./fGd2jOqN.js";function F(t,s,...n){var a=t,e=y,r;_(()=>{e!==(e=s())&&(r&&(g(r),r=null),r=v(()=>e(a,...n)))},m),i&&(a=c)}function N(t){return(s,...n)=>{var o;var a=t(...n),e;if(i)e=c,d();else{var r=a.render().trim(),p=l(r);e=E(p),s.before(e)}const f=(o=a.setup)==null?void 0:o.call(a,e);u(e,e),typeof f=="function"&&h(f)}}export{N as c,F as s};