@uipath/cli
Advanced tools
Sorry, the diff of this file is too big to display
| function h(i){let e=0;for(;e<i.length&&e<=6&&i[e]==="#";)e++;return e}function f(i){let e=0;for(;e<i.length&&i[e]===" ";)e++;return e}function u(i){let e=[],r=[],n=i.replace(/`([^`\n]+)`/g,(c,t)=>(e.push(t),`\0C${e.length-1}\0`));n=n.replace(/\[([^\]\n]{1,300})\]\(([^)\s\n]{1,800})\)/g,(c,t,g)=>`[${t}|${g}]`);let s=(c,t)=>(r.push(t),`\0B${r.length-1}\0`);return n=n.replace(/\*\*([^*\n]+)\*\*/g,s),n=n.replace(/__([^_\n]+)__/g,s),n=n.replace(/\*([^*\n]+)\*/g,(c,t)=>t.trim()===""||t.startsWith(" ")||t.endsWith(" ")?c:`_${t}_`),n=n.replace(/~~([^~\n]+)~~/g,"-$1-"),n=n.replace(new RegExp("\0B(\\d+)\0","g"),(c,t)=>`*${r[Number(t)]}*`),n=n.replace(new RegExp("\0C(\\d+)\0","g"),(c,t)=>`{{${e[Number(t)]}}}`),n}function $(i){let e=i.trim();if(!e.startsWith("```"))return null;let r=e.slice(3).trim();for(let n of r)if(n===" "||n===" ")return null;return r}function E(i){let e=i.replace(/\r\n/g,` | ||
| `).split(` | ||
| `),r=[],n=!1;for(let s of e){let c=$(s);if(c!==null){n?(r.push("{code}"),n=!1):(r.push(c?`{code:${c}}`:"{code}"),n=!0);continue}if(n){r.push(s);continue}let t=h(s);if(t>0&&(s[t]===" "||s[t]===" ")){r.push(`h${t}. ${u(s.slice(t).trim())}`);continue}let g=f(s),p=Math.floor(g/2)+1,o=s.slice(g),l=0;for(;l<o.length&&o[l]>="0"&&o[l]<="9";)l++;if(l>0&&o[l]==="."&&o[l+1]===" "){r.push(`${"#".repeat(p)} ${u(o.slice(l+2))}`);continue}let a=o[0];if((a==="-"||a==="*"||a==="+")&&o[1]===" "){r.push(`${"*".repeat(p)} ${u(o.slice(2))}`);continue}r.push(u(s))}return n&&r.push("{code}"),r.join(` | ||
| `)}export{E as markdownToJiraWiki}; |
+8
-4
| { | ||
| "name": "@uipath/cli", | ||
| "license": "MIT", | ||
| "version": "1.199.0-preview.108", | ||
| "version": "1.200.0-preview.109", | ||
| "description": "Cross platform CLI for UiPath", | ||
@@ -21,3 +21,5 @@ "repository": { | ||
| }, | ||
| "./browser": "./dist/index.browser.js" | ||
| "./browser": "./dist/index.browser.js", | ||
| "./services/markdown-to-jira-wiki": "./dist/services.markdown.browser.js", | ||
| "./services/feedback/browser": "./dist/services.feedback.browser.js" | ||
| }, | ||
@@ -27,3 +29,5 @@ "files": [ | ||
| "dist/index.js.map", | ||
| "dist/index.browser.js" | ||
| "dist/index.browser.js", | ||
| "dist/services.markdown.browser.js", | ||
| "dist/services.feedback.browser.js" | ||
| ], | ||
@@ -39,3 +43,3 @@ "bin": { | ||
| ], | ||
| "gitHead": "171f68daab68809916e8df10ea198c259f688ede" | ||
| "gitHead": "fcc01cdae81bbd0c25d3d4fc287537a9d19d99f4" | ||
| } |
+42
-0
@@ -67,2 +67,44 @@ # UiPath CLI — Browser Bundle | ||
| ## Reusing services without the CLI program | ||
| `@uipath/cli/browser` exports the CLI **runner** — the whole Commander program. | ||
| A host that only needs one of the CLI's services can import it directly: | ||
| ```ts | ||
| // Dependency-free, ~3KB, no side effects. | ||
| const { markdownToJiraWiki } = await import( | ||
| "@uipath/cli/services/markdown-to-jira-wiki" | ||
| ); | ||
| // ~178KB. Browser-only — @uipath/filesystem creates an IndexedDB store on | ||
| // import, so this crashes under Node. Hence the `/browser` suffix, matching | ||
| // `@uipath/cli/browser`. | ||
| const { createFeedbackIssue, uploadAttachment } = await import( | ||
| "@uipath/cli/services/feedback/browser" | ||
| ); | ||
| ``` | ||
| These exist so embedding hosts stop duplicating service logic. Autopilot's Studio | ||
| Web MFE serves `uip feedback send` through a host interceptor — the command is | ||
| Node-only, registered in `cli.node.ts` — and had ported the markdown converter | ||
| and the issue-creation calls verbatim. Two copies of the tracker's | ||
| project/component/field ids is a drift hazard. | ||
| The two entries are split deliberately: the markdown converter is | ||
| dependency-free, so a host that only formats descriptions should not pay for a | ||
| filesystem it never touches. | ||
| **These bundles are browser-safe because of the build, not the dependency graph.** | ||
| `@uipath/common` resolves to its Node source and reaches `node:async_hooks`; | ||
| `build-browser.ts`'s alias map rewrites that to a throwing shim and routes | ||
| `@uipath/filesystem` to its browser entry. Importing the TypeScript sources | ||
| directly is not browser-safe. | ||
| Node-only services are deliberately absent: `send-feedback.ts` | ||
| (`@inquirer/prompts`, stdin) and `environmentInfo.ts` (`node:os`). | ||
| `services.browser.spec.ts` guards the surface and the exclusions. | ||
| No type declarations ship with this package, so declare the surface structurally | ||
| at the call site — the same way Autopilot already declares `run`/`ready`. | ||
| ## Limitations | ||
@@ -69,0 +111,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Network access
Supply chain riskThis module accesses the network.
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
25399004
7.58%7
40%2766
38.3%5
66.67%7
Infinity%6
Infinity%