@aurodesignsystem-dev/auro-cli 0.0.0-pr297.1 → 0.0.0-pr297.3
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/auro-cli.js +12 -12
- package/dist/auro-cli.js.map +2 -2
- package/package.json +1 -1
package/dist/auro-cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{program as Ye}from"commander";import Kt from"figlet";import{mind as Yt}from"gradient-string";var Xe=()=>Yt(Kt.textSync("Auro CLI"));import Ze from"node:fs";import Qe from"node:path";import{fileURLToPath as Xt}from"node:url";function Y(r){process.env.DEBUG&&console.log(`[DEBUG] ${r}`)}function be(){try{let r=Xt(import.meta.url),t=Qe.dirname(r);Y(`Current module path: ${t}`);let e=Qe.resolve(t,"..","package.json");return Y(`Checking package.json at: ${e}`),Ze.existsSync(e)?(Y(`Found package.json at: ${e}`),JSON.parse(Ze.readFileSync(e,"utf8")).version):(Y("Could not find package.json in the standard installed module location, using default version"),"0.0.0")}catch(r){return console.error("Error retrieving package version:",r),"0.0.0"}}import{program as Kr}from"commander";import Et from"ora";function X(r){return r.option("-m, --module-paths [paths...]","Path(s) to node_modules folder").option("-w, --watch","Watches for changes").option("--skip-docs","Skip documentation generation",!1).option("-r, --readme-template <url>","URL to the README template file").option("--wca-input [files...]","Source file(s) to analyze for API documentation").option("--wca-output [files...]","Output file(s) for API documentation")}function Z(r){return r.option("-s, --serve","Starts a server").option("-p, --port <number>","Port for the server").option("-o, --open","Open the browser after starting the server")}import
|
|
2
|
+
import{program as Ye}from"commander";import Kt from"figlet";import{mind as Yt}from"gradient-string";var Xe=()=>Yt(Kt.textSync("Auro CLI"));import Ze from"node:fs";import Qe from"node:path";import{fileURLToPath as Xt}from"node:url";function Y(r){process.env.DEBUG&&console.log(`[DEBUG] ${r}`)}function be(){try{let r=Xt(import.meta.url),t=Qe.dirname(r);Y(`Current module path: ${t}`);let e=Qe.resolve(t,"..","package.json");return Y(`Checking package.json at: ${e}`),Ze.existsSync(e)?(Y(`Found package.json at: ${e}`),JSON.parse(Ze.readFileSync(e,"utf8")).version):(Y("Could not find package.json in the standard installed module location, using default version"),"0.0.0")}catch(r){return console.error("Error retrieving package version:",r),"0.0.0"}}import{program as Kr}from"commander";import Et from"ora";function X(r){return r.option("-m, --module-paths [paths...]","Path(s) to node_modules folder").option("-w, --watch","Watches for changes").option("--skip-docs","Skip documentation generation",!1).option("-r, --readme-template <url>","URL to the README template file").option("--wca-input [files...]","Source file(s) to analyze for API documentation").option("--wca-output [files...]","Output file(s) for API documentation")}function Z(r){return r.option("-s, --serve","Starts a server").option("-p, --port <number>","Port for the server").option("-o, --open","Open the browser after starting the server")}import qr from"@rollup/plugin-terser";import{watch as zr}from"rollup";import{existsSync as ht,readFileSync as Nr,rmSync as jr,writeFileSync as Fr}from"node:fs";import{basename as _r,dirname as Mr,join as L,resolve as ae}from"node:path";import{pathToFileURL as yt}from"node:url";import{glob as Br}from"glob";import Pe from"ora";import{rollup as Ie}from"rollup";import*as wt from"sass";import B from"ora";import{spawn as Zt}from"node:child_process";import Qt from"ora";var v=(r,t)=>{let e=`${r} ${t?t.join(" "):""}`,o=Qt(),n=r,s=t||[];if(!t&&typeof r=="string"){let m=r.split(" ");n=m[0],s=m.slice(1)}let i=e.includes("--watch")||e.includes(" -w"),l=Zt(n,s,{stdio:i?"inherit":["inherit","pipe","pipe"],shell:!0});if(!i){let m=[];l.stdout?.on("data",u=>{let c=u.toString();m.push(c),process.stdout.write(c)}),l.stderr?.on("data",u=>{let c=u.toString();m.push(c),process.stderr.write(c)})}return new Promise((m,u)=>{l.on("close",c=>{c!==0?i?(o.info(`Watch mode terminated with code ${c}`),m()):(o.fail(`${e} failed (code ${c})`),u(new Error(`Command failed with exit code ${c}`))):(o.succeed(`${e} completed successfully`),m())})})};import Q from"node:fs";import er from"node:path";import{markdownTable as et}from"markdown-table";var N=class r{static{this.manifest={schemaVersion:"1.0.0",readme:"",modules:[]}}static generate(t={}){let{outDir:e="./docs",outFile:o="api.md",manifestPath:n="./custom-elements.json"}=t,{getElements:s,renderAllElements:i}=r;if(n)try{let c=Q.readFileSync(n,"utf8");r.manifest=JSON.parse(c)}catch(c){throw console.error(`Error reading manifest file at ${n}:`,c),c}let a=s(),l=e;Q.existsSync(l)||Q.mkdirSync(l,{recursive:!0});let m=i(a),u=er.join(l,o);Q.writeFileSync(u,m),console.log(`Generated combined API documentation at ${u}`)}static getElements(){let t=r.manifest.modules.filter(r.isWcaModule);return r.manifest.modules.reduce((e,o)=>e.concat(o.declarations?.filter(n=>"customElement"in n&&n.customElement===!0&&"tagName"in n&&(t.length>0?r.isWcaModule(o):!0))??[]),[])}static isWcaModule(t){let{path:e}=t;return e?e.startsWith("scripts/wca/auro-")&&e.endsWith(".js"):!1}static renderAllElements(t){return`${t.sort((e,o)=>(e.tagName||"").localeCompare(o.tagName||"")).map(e=>r.renderElement(e,!0)).join(`
|
|
3
3
|
|
|
4
4
|
`)}`}static renderElement(t,e=!0){let o=[],{renderTable:n,renderPropertiesAttributesTable:s,renderParameters:i,getType:a}=r;o.push(e?`# ${t.tagName}`:""),t.description&&o.push(t.description);let l=s(t);l&&o.push(l.trim());let m=n("Methods",["name","parameters","return","description"],(t.members||[]).filter(p=>p.kind==="method"&&("privacy"in p?p.privacy!=="private":!0)&&p.name[0]!=="_").map(p=>({...p,parameters:i("parameters"in p?p.parameters:void 0),return:"return"in p&&p.return?a(p.return):""})));m&&o.push(m.trim());let u=n("Events",["name","description"],t.events);u&&o.push(u.trim());let c=n("Slots",[["name","(default)"],"description"],t.slots);c&&o.push(c.trim());let d=n("CSS Shadow Parts",["name","description"],t.cssParts);d&&o.push(d.trim());let f=n("CSS Custom Properties",["name","description"],t.cssProperties);return f&&o.push(f.trim()),o.join(`
|
|
5
5
|
|
|
@@ -22,7 +22,7 @@ ${O.trimEnd()}
|
|
|
22
22
|
`)+g});let u=o.split(`
|
|
23
23
|
`),c=!1;for(let d=0;d<u.length;d++)/<pre[\s>]/i.test(u[d])&&(c=!0),c||(u[d]=u[d].replace(/^[ \t]+(?=<)/,"")),/<\/pre>/i.test(u[d])&&(c=!1);await C.promises.writeFile(r,u.join(`
|
|
24
24
|
`))}async function _(r={}){let t=r.readmeTemplate,e=t&&!t.startsWith("http");await fr({...it,...e?{localReadmePath:T.resolve(process.cwd(),t)}:{remoteReadmeUrl:t||"https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/README.md"}},r.skipReadme)}function st(r){return C.existsSync($(r))}import{existsSync as at,readFileSync as hr}from"node:fs";import{builtinModules as yr}from"node:module";import{resolve as re}from"node:path";import{startDevServer as wr}from"@web/dev-server";import{hmrPlugin as br}from"@web/dev-server-hmr";import*as ct from"esbuild";import kr from"ora";var S=["node_modules","../node_modules","../../node_modules","../../../node_modules"];var Ar=/^\/__wds-outside-root__\/(\d+)\/(.+)$/;function $r(){return{name:"node-modules-css",serve(r){if(!r.path.endsWith(".css")||!r.path.startsWith("/@")&&!/^\/[a-z]/i.test(r.path))return;let t=r.path.slice(1),e=process.cwd();for(let o of S){let n=re(e,o,t);if(at(n))return{body:hr(n,"utf-8"),type:"css"}}}}}function vr(r,t){let e=r.match(Ar);return e?re(t,"../".repeat(Number.parseInt(e[1],10)),e[2]):re(t,`.${r}`)}function Er(){let r=/\b(require\s*\(|module\.exports\b|exports\.\w)/,t=new Map,e;return{name:"cjs-to-esm",async serverStart({config:o}){e=re(o.rootDir)},async transform(o){if(!o.path.includes("node_modules")||!o.path.endsWith(".js")&&!o.path.endsWith(".cjs")||typeof o.body!="string"||!r.test(o.body))return;let n=vr(o.path,e);if(t.has(n))return t.get(n);if(at(n))try{let i={body:(await ct.build({entryPoints:[n],bundle:!0,format:"esm",platform:"browser",write:!1,logLevel:"silent",external:yr})).outputFiles[0].text};return t.set(n,i),i}catch(s){console.error(`CJS-to-ESM bundling failed for ${o.path}:`,s.message)}}}}var M={watch:!0,nodeResolve:!0,basePath:"/",rootDir:"./demo",hmrInclude:["src/**/*","demo/**/*","apiExamples/**/*","docs/**/*"]};async function oe(r={}){if(!r.serve)return;let t=kr(`Firing up dev server...
|
|
25
|
-
`).start();try{let e={port:Number(r.port)||void 0,open:r.open?"/":void 0,watch:r.watch??M.watch,nodeResolve:r.nodeResolve??M.nodeResolve,basePath:r.basePath??M.basePath,rootDir:r.rootDir??M.rootDir,middleware:[function(s,i){return!s.url.endsWith("/")&&!s.url.includes(".")&&(s.url+=".html"),i()}],plugins:[$r(),Er(),br({include:r.hmrInclude??M.hmrInclude})]},o=await wr({config:e,readCliArgs:!1,readFileConfig:!1});return t.stop(),o}catch(e){throw t.fail("Server snag! Couldn't start dev server."),console.error("Error starting development server:",e),new Error(`Development server failed to start: ${e.message}`)}}async function ne(){let r=B("Generating Custom Elements Manifest...").start();try{await v(`npx --package=@custom-elements-manifest/analyzer -y -- cem analyze --config '${tt("custom-elements-manifest.config.mjs")}'`),r.succeed("Custom Elements Manifest generated successfully!")}catch(t){let e=t instanceof Error?t.message:String(t);r.warn("CEM analyzer completed with warnings: "+e)}}async function se(){let r=B("Generating API md file...").start();try{await N.generate(),r.succeed("API md file generated successfully!")}catch(t){let e=t instanceof Error?t.message:String(t);throw r.fail("Failed to generate API md file: "+e),t}}async function lt(r={}){let t=B("Compiling documentation...").start();try{await _(r),t.succeed("Documentation compiled successfully!")}catch(e){let o=e instanceof Error?e.message:String(e);throw t.fail("Failed to compile MD documentation: "+o),e}j(),await R(),await Se(r)}async function ut(r={}){await oe(r)}async function mt(r={}){let t=await import("chokidar"),e=["./src/**/*","./docs/**/*","./docTemplates/**/*","./apiExamples/**/*","./demo/**/*.scss"],o=["**/demo/*.min.js","**/demo/*.min.css","**/demo/*.md","**/demo/readme.md","**/docs/api.md","**/custom-elements.json","**/node_modules/**","**/dist/**","**/.git/**"],n=t.watch(e,{ignoreInitial:!0,ignored:o,awaitWriteFinish:{stabilityThreshold:1e3,pollInterval:100}}),s=B("Waiting for changes...");s.spinner="bouncingBar",s.color="green",s.start();let i=null,a=!1,l=!1;async function m(u){if(a){l=!0;return}a=!0,n.unwatch(e);let c=B(`Change detected: ${u}`).start();try{await _(r),j(),await R(),await Se(r),c.succeed("Docs rebuilt!")}catch(d){let f=d instanceof Error?d.message:String(d);c.fail("Rebuild failed: "+f)}finally{setTimeout(()=>{n.add(e),a=!1,l&&(l=!1,m("queued changes"))},1e3)}}n.on("all",(u,c)=>{a||(i&&clearTimeout(i),i=setTimeout(()=>{m(c)},1e3))}),F(n),te()}async function ie(){await ne(),await se()}import{basename as Sr,join as pt,resolve as Rr}from"node:path";import xr from"@rollup/plugin-commonjs";import{nodeResolve as Ir}from"@rollup/plugin-node-resolve";import{glob as Pr}from"glob";import{litScss as Dr}from"rollup-plugin-scss-lit";import Cr from"node:path";import{glob as Tr}from"glob";function dt(r){return{name:"watch-globs",buildStart(){let t=Array.isArray(r)?r:[r];for(let e of t)try{for(let o of Tr.sync(Cr.resolve(e)))this.addWatchFile(o)}catch(o){this.error(`Error watching glob pattern "${e}": ${o.message}`)}}}}var Re={moduleDirectories:["node_modules"],modulePaths:["../../node_modules","../node_modules","node_modules"],watchPatterns:["./apiExamples/**/*","./docs/**/*"]};function ft(r=[],t={}){let{watchPatterns:e=Re.watchPatterns,dedupe:o=["lit","lit-element","lit-html"],dev:n=!1}=t,s=[...Re.modulePaths,...r],i=process.cwd(),a=S.map(l=>Rr(i,l));return[Ir({dedupe:o,preferBuiltins:!1,moduleDirectories:Re.moduleDirectories,modulePaths:a}),xr(),Dr({minify:n?!1:{fast:!0},options:{loadPaths:[...s,pt(process.cwd(),"src","styles"),pt(process.cwd(),"src")]}}),dt(e)]}function xe(r={}){let{modulePaths:t=[],watch:e=!1,input:o=["./src/index.js","./src/registered.js"],outputDir:n="./dist",format:s="esm",dev:i=!1}=r;return{name:"Main",config:{input:o,output:{format:s,dir:n,entryFileNames:a=>i||["index","registered"].includes(a.name)?"[name].js":"[name]-[hash].js",chunkFileNames:i?"[name].js":"[name]-[hash].js",assetFileNames:i?"[name][extname]":"[name]-[hash][extname]"},external:Or(),plugins:ft(t,{dev:i}),watch:gt(e)}}}function G(r={}){let{modulePaths:t=[],watch:e=!1,globPattern:o="./demo/*.js",ignorePattern:n=["./demo/*.min.js"],outputDir:s="./demo",dev:i=!1}=r,a=Pr.sync(o,{ignore:n}),l=ft(t,{dev:i}),m=gt(e);return{name:"Demo",configs:a.map(c=>({input:{[Sr(c,".js")]:c},output:{format:"esm",dir:s,entryFileNames:"[name].min.js",chunkFileNames:"[name].min.js",assetFileNames:i?"[name][extname]":"[name]-[hash][extname]",inlineDynamicImports:!0},plugins:l,onwarn(f,p){if(f.code==="UNRESOLVED_IMPORT")throw new Error(`Unresolved import "${f.exporter??f.source}" in ${f.id??c}. Make sure workspace dependencies are built before bundling demos.`);p(f)},watch:m}))}}function gt(r){if(!r)return!1;let t=typeof r=="object"?r:{};return{clearScreen:t.clearScreen??!0,buildDelay:t.buildDelay??500,chokidar:{ignoreInitial:!0,ignored:t.ignored??["**/dist/**/*.d.ts","**/custom-elements.json","**/demo/*.md","**/demo/**/*.min.js","**/demo/**/*.min.css","**/docs/api.md","**/node_modules/**","**/.git/**"],awaitWriteFinish:t.awaitWriteFinish??{stabilityThreshold:1e3,pollInterval:100}},include:t.include??["./src/**/*.scss","./src/**/*.js","./src/**/*.ts","./demo/**/*.js","./apiExamples/**/*","./docs/**/*.md"],exclude:t.exclude??["./dist/**/*","./node_modules/**/*"]}}function Or(r=[]){return[...[/node_modules\/lit/,/node_modules\/lit-element/,/node_modules\/lit-html/,/node_modules\/@lit/],...r]}function bt(){let r=L("./dist"),t=Pe("Cleaning dist folder...").start();try{return jr(r,{recursive:!0,force:!0}),t.succeed("All clean! Dist folder wiped."),!0}catch(e){return t.fail(`Oops! Couldn't clean dist/ folder: ${e.message}`),console.error(e),!1}}async function ce(r,t,e,o){let n=Pe(r).start();try{let s=await t();return n.succeed(e),s}catch(s){throw n.fail(o),console.error(`Error: ${s.message}`),s}}async function kt(r,t){return ce(`Bundling ${r.name||"main"} and demo...`,async()=>{let e=await Ie(r);await e.write(r.output),await e.close();for(let o of t){let n=await Ie(o);await n.write(o.output),await n.close()}},`Bundles ready! ${r.name||"Main"} and demo built.`,"Bundle hiccup! Build failed.")}async function le(r){let{wcaInput:t,wcaOutput:e,skipDocs:o}=r;if(o){let n=Pe("Skipping docs generation...").start();setTimeout(()=>{n.succeed("Docs generation skipped.")},0);return}return ce("Analyzing components and making docs...",async()=>{await ie(t,e),await _(r),j()},"Docs ready! Looking good.","Doc troubles!")}function Gr(){let r=process.cwd();function t(n){return[n,`${n}.scss`,`${n}.css`,L(Mr(n),`_${_r(n)}.scss`),L(n,"_index.scss"),L(n,"index.scss")].find(i=>ht(i))}function e(n){for(let i of S){let a=t(ae(r,i,n));if(a)return a}let s=o(n);return s||null}function o(n){let s,i;if(n.startsWith("@")){let a=n.split("/");if(a.length<3)return null;s=`${a[0]}/${a[1]}`,i=`./${a.slice(2).join("/")}`}else{let a=n.indexOf("/");if(a===-1)return null;s=n.slice(0,a),i=`./${n.slice(a+1)}`}for(let a of S){let l=ae(r,a,s,"package.json");if(ht(l))try{let u=JSON.parse(Nr(l,"utf-8")).exports;if(!u||typeof u!="object")continue;let c=u[i];if(!c)continue;let d=typeof c=="string"?c:c.default||c.import;if(!d)continue;let f=t(ae(r,a,s,d));if(f)return f}catch{continue}}return null}return{findFileUrl(n){if(n.includes("/node_modules/")){let s=n.lastIndexOf("/node_modules/"),i=n.slice(s+14),a=e(i);if(a)return yt(a)}if(!n.startsWith(".")&&!n.startsWith("/")&&!n.startsWith("file:")){let s=e(n);if(s)return yt(s)}return null}}}async function R(r="./demo"){return ce("Compiling demo SCSS...",async()=>{let t=Br.sync(L(r,"**/*.scss")),e=Gr(),o=process.cwd(),n=S.map(s=>ae(o,s));for(let s of t){let i=wt.compile(s,{importers:[e],loadPaths:n,silenceDeprecations:["import"],style:"compressed"}),a=s.replace(/\.scss$/,".min.css");Fr(a,i.css)}return t.length},"Demo SCSS compiled.","SCSS compilation failed.")}async function Se(r={}){let{configs:t}=G(r);return ce("Bundling demo JS...",async()=>{for(let e of t){let o=await Ie(e);await o.write(e.output),await o.close()}},"Demo JS bundled.","Demo JS bundling failed.")}import At from"node:path";import I from"ora";import"rollup";var U=!1,Lr={analyze:{active:!1,lastTime:0},docs:{active:!1,lastTime:0},scss:{active:!1,lastTime:0}},Ur=5e3,ue=new Set,Hr=["/dist/index.d.ts","/custom-elements.json","/demo/api.md","/docs/api.md","/demo/index.min.js"];function Wr(r){if(!r||typeof r!="string")return!1;try{let t=At.normalize(r);return Hr.some(e=>t.endsWith(e))||t.includes("/dist/")||t.endsWith(".min.js")||t.endsWith(".min.css")||t.endsWith(".d.ts")}catch(t){return console.error(`Error checking path (${typeof r}):`,t.message),!1}}async function De(r,t){let e=Lr[r];if(e.active||Date.now()-e.lastTime<Ur)return!1;try{return e.active=!0,e.lastTime=Date.now(),await t()}catch(o){return console.error(`Error in ${r} task:`,o),!1}finally{e.active=!1}}async function $t(r,t,e){let o=!0,n={analyze:!1,docs:!1,scss:!1},s=null,i,a=I("Activating watch mode...").start(),l={analyze:async()=>{let{wcaInput:c,wcaOutput:d,skipDocs:f}=t;if(f){let g=I("Skipping component analysis...").start();return setTimeout(()=>{g.succeed("Component analysis skipped.")},0),!0}let p=I("Detective work: analyzing components...").start();try{return await ie(c,d),p.succeed("Component analysis complete! API generated."),!0}catch(g){return p.fail("Analysis hiccup! Something went wrong."),console.error("Component analysis error:",g),!1}},docs:async()=>{if(U)return!1;if(t.skipDocs){let d=I("Skipping docs generation...").start();return setTimeout(()=>{d.succeed("Docs generation skipped.")},0),!0}let c=I("Refreshing docs...").start();try{return await le(t),c.succeed("Documentation refreshed!"),!0}catch(d){c.fail("Docs stumble! Couldn't refresh."),console.error("Documentation rebuild error:",d)}},scss:async()=>{if(U)return!1;try{return await R(),!0}catch(c){return console.error("Demo SCSS compilation error:",c),!1}}},m=()=>{o&&n.analyze&&n.docs&&n.scss&&typeof e=="function"&&(o=!1,e())};function u(c=1e3){s&&clearTimeout(s),s=setTimeout(async()=>{setTimeout(async()=>{n.analyze=await De("analyze",l.analyze),setTimeout(async()=>{n.docs=await De("docs",l.docs),setTimeout(async()=>{n.scss=await De("scss",l.scss),m()},500)},1e3)},1e3)},c)}r.on("event",async c=>{switch(c.code){case"START":a.succeed("Watch mode active! Eyes peeled.");break;case"BUNDLE_START":if(ue.clear(),c.input)try{let d=Array.isArray(c.input)?c.input:typeof c.input=="string"?[c.input]:typeof c.input=="object"&&c.input!==null?Object.values(c.input):[];for(let f of d)typeof f=="string"&&!Wr(f)&&ue.add(At.normalize(f))}catch(d){console.error("Error processing input paths:",d)}i=I("Weaving bundles...").start(),U=!0;break;case"BUNDLE_END":i&&i.succeed(`Bundle ${Array.isArray(c.input)?`of ${c.input.join("& ")} `:""}done in ${c.duration}ms! \u{1F680}`),U=!1,ue.size>0&&u();break;case"END":break;case"ERROR":U=!1,i?i.fail(`Oops! Bundle hit a snag: ${c.error.message}`):I().fail(`Watch mode hiccup: ${c.error.message}`),ue.clear();break}})}function vt(r,t){return F(r),t&&F(t),te(),r}async function Vr(r){let t=xe(r),e=G(r);r.dev||t.config.plugins.push(zr()),await le(r),await R(),await kt(t.config,e.configs)}async function Jr(r){let{dev:t}=r,e=xe({...r,watch:!0}),o=G({...r,watch:!0}),n=qr([e.config,...o.configs]);$t(n,r,t?async()=>oe(r):void 0);let s=await import("chokidar"),i=!1,a=!1,l=null,m=s.watch("./demo/**/*.scss",{ignoreInitial:!0,ignored:["**/demo/**/*.min.css"],awaitWriteFinish:{stabilityThreshold:500,pollInterval:100}});return m.on("all",()=>{l&&clearTimeout(l),l=setTimeout(async()=>{if(i){a=!0;return}i=!0;try{await R()}catch(u){console.error("Demo SCSS watch compilation error:",u)}finally{i=!1,a&&(a=!1,m.emit("all"))}},500)}),vt(n,m),n}async function me(r={}){try{let{watch:t}=r;return bt(),t?await Jr(r):await Vr(r)}catch(t){throw new Error(`Build failed: ${t.message}`)}}var H=Kr.command("dev").description("Runs development server for auro components");H=X(H);H=Z(H);var Xs=H.action(async r=>{try{let t=Et("Initializing...");r.watch?(t.text="Waiting for changes...",t.spinner="bouncingBar",t.color="green"):t.text=r.docs===!1?"Building component (docs disabled)":"Building component",t.start(),r.watch||t.succeed("Build completed!"),await me({...r,dev:!0,watch:r.watch})}catch(t){Et().fail(`Build failed: ${t.message}`),console.error(t),process.exit(1)}});import{program as Yr}from"commander";import Ct from"ora";var Oe=Yr.command("build").description("Builds auro components");Oe=X(Oe);var oi=Oe.action(async r=>{try{let t=Ct("Initializing...");r.watch?(t.text="Waiting for changes...",t.spinner="bouncingBar",t.color="green"):t.text=r.docs===!1?"Building component (docs disabled)":"Building component",t.start(),await me(r),r.watch||t.succeed("Build completed!")}catch(t){Ct().fail(`Build failed: ${t.message}`),console.error(t),process.exit(1)}});import{exec as Xr}from"node:child_process";import Tt from"node:path";import Zr from"node:process";import{fileURLToPath as Qr}from"node:url";import eo from"node:util";import{program as to}from"commander";import ro from"inquirer";var pi=to.command("migrate").description("Script runner to perform repetitive code change tasks").requiredOption("-i, --id <string>","Select the migration you would like to run by id").option("-m, --multi-gitter","Run the migration on all repositories in the multi-gitter config").action(async r=>{let t=Qr(import.meta.url),e=Tt.dirname(t),o=Tt.resolve(e,"migrations",r.id);if(r.multiGitter){let n=eo.promisify(Xr);try{await n("command -v multi-gitter")}catch{console.error("multi-gitter is not installed."),Zr.exit(1)}(await ro.prompt([{type:"confirm",name:"dryRun",message:"Run migration in dry-run mode? (no changes will be committed)",default:!0}])).dryRun?v(`multi-gitter run ${o}/script.sh --config "${o}/multi-gitter.yml" --dry-run`):v(`multi-gitter run ${o}/script.sh --config "${o}/multi-gitter.yml"`)}else v(`${o}/script.sh`)});import Pt from"node:process";import{program as ao}from"commander";import{readFile as co,writeFile as lo}from"node:fs/promises";import{Logger as W}from"@aurodesignsystem/auro-library/scripts/utils/logger.mjs";import Ne from"node:fs/promises";import je from"node:path";import{Octokit as oo}from"@octokit/rest";import E from"ora";import{processContentForFile as no,templateFiller as so}from"@aurodesignsystem/auro-library/scripts/utils/sharedFileProcessorUtils.mjs";async function St(r,t){let e=new oo({auth:process.env.GITHUB_TOKEN||""});try{let n=(await e.request("GET /repos/{owner}/{repo}/contents/{path}",{ref:t,owner:"AlaskaAirlines",repo:"auro-templates",path:r,headers:{"X-GitHub-Api-Version":"2022-11-28"}})).data;if(typeof n!="object"||!Array.isArray(n)){let s=`Unexpected response format: ${JSON.stringify(n)}`;throw E().start().fail(s),new Error("Failed to retrieve folder items")}return n}catch(o){let n=E().start();throw o.status===404?n.fail(`Template '${r.split("/")[1]}' not found`):n.fail(`Error accessing template: ${o.message}`),o}}async function Rt({folderItems:r,templatePathToReplace:t,rootDir:e,ref:o}){let n=[];for(let s of r){if(s.type=="dir"){let m=E(`Processing directory: ${s.path}`).start(),u=await St(s.path,o);m.succeed(`Found ${u.length} additional items in ${s.path}`);let c=await Rt({folderItems:u,templatePathToReplace:t,rootDir:e,ref:o});n.push(...c);continue}let i=s.path.replace(`${t}/`,""),a=`${e}/.github/${i}`,l={identifier:s.name,input:{remoteUrl:s.download_url||"",fileName:a,overwrite:!0},output:a};n.push(l)}return n}async function io(r){try{await Ne.rm(r,{recursive:!0,force:!0}),E().start().succeed(`Successfully removed directory: ${r}`)}catch(t){throw E().start().fail(`Error removing directory ${r}: ${t.message}`),t}}async function xt(r,t="",e=!0){try{let o=await Ne.stat(r),n=je.basename(r);if(!o.isDirectory())return`${t}${e?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 "}${n}
|
|
25
|
+
`).start();try{let e={port:Number(r.port)||void 0,open:r.open?"/":void 0,watch:r.watch??M.watch,nodeResolve:r.nodeResolve??M.nodeResolve,basePath:r.basePath??M.basePath,rootDir:r.rootDir??M.rootDir,middleware:[function(s,i){return!s.url.endsWith("/")&&!s.url.includes(".")&&(s.url+=".html"),i()}],plugins:[$r(),Er(),br({include:r.hmrInclude??M.hmrInclude})]},o=await wr({config:e,readCliArgs:!1,readFileConfig:!1});return t.stop(),o}catch(e){throw t.fail("Server snag! Couldn't start dev server."),console.error("Error starting development server:",e),new Error(`Development server failed to start: ${e.message}`)}}async function ne(){let r=B("Generating Custom Elements Manifest...").start();try{await v(`npx --package=@custom-elements-manifest/analyzer -y -- cem analyze --config '${tt("custom-elements-manifest.config.mjs")}'`),r.succeed("Custom Elements Manifest generated successfully!")}catch(t){let e=t instanceof Error?t.message:String(t);r.warn("CEM analyzer completed with warnings: "+e)}}async function se(){let r=B("Generating API md file...").start();try{await N.generate(),r.succeed("API md file generated successfully!")}catch(t){let e=t instanceof Error?t.message:String(t);throw r.fail("Failed to generate API md file: "+e),t}}async function lt(r={}){let t=B("Compiling documentation...").start();try{await _(r),t.succeed("Documentation compiled successfully!")}catch(e){let o=e instanceof Error?e.message:String(e);throw t.fail("Failed to compile MD documentation: "+o),e}j(),await R(),await Se(r)}async function ut(r={}){await oe(r)}async function mt(r={}){let t=await import("chokidar"),e=["./src/**/*","./docs/**/*","./docTemplates/**/*","./apiExamples/**/*","./demo/**/*.scss"],o=["**/demo/*.min.js","**/demo/*.min.css","**/demo/*.md","**/demo/readme.md","**/docs/api.md","**/custom-elements.json","**/node_modules/**","**/dist/**","**/.git/**"],n=t.watch(e,{ignoreInitial:!0,ignored:o,awaitWriteFinish:{stabilityThreshold:1e3,pollInterval:100}}),s=B("Waiting for changes...");s.spinner="bouncingBar",s.color="green",s.start();let i=null,a=!1,l=!1;async function m(u){if(a){l=!0;return}a=!0,n.unwatch(e);let c=B(`Change detected: ${u}`).start();try{await _(r),j(),await R(),await Se(r),c.succeed("Docs rebuilt!")}catch(d){let f=d instanceof Error?d.message:String(d);c.fail("Rebuild failed: "+f)}finally{setTimeout(()=>{n.add(e),a=!1,l&&(l=!1,m("queued changes"))},1e3)}}n.on("all",(u,c)=>{a||(i&&clearTimeout(i),i=setTimeout(()=>{m(c)},1e3))}),F(n),te()}async function ie(){await ne(),await se()}import{basename as Sr,join as pt,resolve as Rr}from"node:path";import xr from"@rollup/plugin-commonjs";import{nodeResolve as Ir}from"@rollup/plugin-node-resolve";import{glob as Pr}from"glob";import{litScss as Dr}from"rollup-plugin-scss-lit";import Cr from"node:path";import{glob as Tr}from"glob";function dt(r){return{name:"watch-globs",buildStart(){let t=Array.isArray(r)?r:[r];for(let e of t)try{for(let o of Tr.sync(Cr.resolve(e)))this.addWatchFile(o)}catch(o){this.error(`Error watching glob pattern "${e}": ${o.message}`)}}}}var Re={moduleDirectories:["node_modules"],modulePaths:["../../node_modules","../node_modules","node_modules"],watchPatterns:["./apiExamples/**/*","./docs/**/*"]};function ft(r=[],t={}){let{watchPatterns:e=Re.watchPatterns,dedupe:o=["lit","lit-element","lit-html"],dev:n=!1}=t,s=[...Re.modulePaths,...r],i=process.cwd(),a=S.map(l=>Rr(i,l));return[Ir({dedupe:o,preferBuiltins:!1,moduleDirectories:Re.moduleDirectories,modulePaths:a}),xr(),Dr({minify:n?!1:{fast:!0},options:{loadPaths:[...s,pt(process.cwd(),"src","styles"),pt(process.cwd(),"src")]}}),dt(e)]}function xe(r={}){let{modulePaths:t=[],watch:e=!1,input:o=["./src/index.js","./src/registered.js"],outputDir:n="./dist",format:s="esm",dev:i=!1}=r;return{name:"Main",config:{input:o,output:{format:s,dir:n,entryFileNames:a=>i||["index","registered"].includes(a.name)?"[name].js":"[name]-[hash].js",chunkFileNames:i?"[name].js":"[name]-[hash].js",assetFileNames:i?"[name][extname]":"[name]-[hash][extname]"},external:Or(),plugins:ft(t,{dev:i}),watch:gt(e)}}}function G(r={}){let{modulePaths:t=[],watch:e=!1,globPattern:o="./demo/*.js",ignorePattern:n=["./demo/*.min.js"],outputDir:s="./demo",dev:i=!1}=r,a=Pr.sync(o,{ignore:n}),l=ft(t,{dev:i}),m=gt(e);return{name:"Demo",configs:a.map(c=>({input:{[Sr(c,".js")]:c},output:{format:"esm",dir:s,entryFileNames:"[name].min.js",chunkFileNames:"[name].min.js",assetFileNames:i?"[name][extname]":"[name]-[hash][extname]",inlineDynamicImports:!0},plugins:l,onwarn(f,p){if(f.code==="UNRESOLVED_IMPORT")throw new Error(`Unresolved import "${f.exporter??f.source}" in ${f.id??c}. Make sure workspace dependencies are built before bundling demos.`);p(f)},watch:m}))}}function gt(r){if(!r)return!1;let t=typeof r=="object"?r:{};return{clearScreen:t.clearScreen??!0,buildDelay:t.buildDelay??500,chokidar:{ignoreInitial:!0,ignored:t.ignored??["**/dist/**/*.d.ts","**/custom-elements.json","**/demo/*.md","**/demo/**/*.min.js","**/demo/**/*.min.css","**/docs/api.md","**/node_modules/**","**/.git/**"],awaitWriteFinish:t.awaitWriteFinish??{stabilityThreshold:1e3,pollInterval:100}},include:t.include??["./src/**/*.scss","./src/**/*.js","./src/**/*.ts","./demo/**/*.js","./apiExamples/**/*","./docs/**/*.md"],exclude:t.exclude??["./dist/**/*","./node_modules/**/*"]}}function Or(r=[]){return[...[/node_modules\/lit/,/node_modules\/lit-element/,/node_modules\/lit-html/,/node_modules\/@lit/],...r]}function bt(){let r=L("./dist"),t=Pe("Cleaning dist folder...").start();try{return jr(r,{recursive:!0,force:!0}),t.succeed("All clean! Dist folder wiped."),!0}catch(e){return t.fail(`Oops! Couldn't clean dist/ folder: ${e.message}`),console.error(e),!1}}async function ce(r,t,e,o){let n=Pe(r).start();try{let s=await t();return n.succeed(e),s}catch(s){throw n.fail(o),console.error(`Error: ${s.message}`),s}}async function kt(r,t){return ce(`Bundling ${r.name||"main"} and demo...`,async()=>{let e=await Ie(r);await e.write(r.output),await e.close();for(let o of t){let n=await Ie(o);await n.write(o.output),await n.close()}},`Bundles ready! ${r.name||"Main"} and demo built.`,"Bundle hiccup! Build failed.")}async function le(r){let{wcaInput:t,wcaOutput:e,skipDocs:o}=r;if(o){let n=Pe("Skipping docs generation...").start();setTimeout(()=>{n.succeed("Docs generation skipped.")},0);return}return ce("Analyzing components and making docs...",async()=>{await ie(t,e),await _(r),j()},"Docs ready! Looking good.","Doc troubles!")}function Gr(){let r=process.cwd();function t(n){return[n,`${n}.scss`,`${n}.css`,L(Mr(n),`_${_r(n)}.scss`),L(n,"_index.scss"),L(n,"index.scss")].find(i=>ht(i))}function e(n){for(let i of S){let a=t(ae(r,i,n));if(a)return a}let s=o(n);return s||null}function o(n){let s,i;if(n.startsWith("@")){let a=n.split("/");if(a.length<3)return null;s=`${a[0]}/${a[1]}`,i=`./${a.slice(2).join("/")}`}else{let a=n.indexOf("/");if(a===-1)return null;s=n.slice(0,a),i=`./${n.slice(a+1)}`}for(let a of S){let l=ae(r,a,s,"package.json");if(ht(l))try{let u=JSON.parse(Nr(l,"utf-8")).exports;if(!u||typeof u!="object")continue;let c=u[i];if(!c)continue;let d=typeof c=="string"?c:c.default||c.import;if(!d)continue;let f=t(ae(r,a,s,d));if(f)return f}catch{continue}}return null}return{findFileUrl(n){if(n.includes("/node_modules/")){let s=n.lastIndexOf("/node_modules/"),i=n.slice(s+14),a=e(i);if(a)return yt(a)}if(!n.startsWith(".")&&!n.startsWith("/")&&!n.startsWith("file:")){let s=e(n);if(s)return yt(s)}return null}}}async function R(r="./demo"){return ce("Compiling demo SCSS...",async()=>{let t=Br.sync(L(r,"**/*.scss")),e=Gr(),o=process.cwd(),n=S.map(s=>ae(o,s));for(let s of t){let i=wt.compile(s,{importers:[e],loadPaths:n,silenceDeprecations:["import"],style:"compressed"}),a=s.replace(/\.scss$/,".min.css");Fr(a,i.css)}return t.length},"Demo SCSS compiled.","SCSS compilation failed.")}async function Se(r={}){let{configs:t}=G(r);return ce("Bundling demo JS...",async()=>{for(let e of t){let o=await Ie(e);await o.write(e.output),await o.close()}},"Demo JS bundled.","Demo JS bundling failed.")}import At from"node:path";import I from"ora";import"rollup";var U=!1,Lr={analyze:{active:!1,lastTime:0},docs:{active:!1,lastTime:0},scss:{active:!1,lastTime:0}},Ur=5e3,ue=new Set,Hr=["/dist/index.d.ts","/custom-elements.json","/demo/api.md","/docs/api.md","/demo/index.min.js"];function Wr(r){if(!r||typeof r!="string")return!1;try{let t=At.normalize(r);return Hr.some(e=>t.endsWith(e))||t.includes("/dist/")||t.endsWith(".min.js")||t.endsWith(".min.css")||t.endsWith(".d.ts")}catch(t){return console.error(`Error checking path (${typeof r}):`,t.message),!1}}async function De(r,t){let e=Lr[r];if(e.active||Date.now()-e.lastTime<Ur)return!1;try{return e.active=!0,e.lastTime=Date.now(),await t()}catch(o){return console.error(`Error in ${r} task:`,o),!1}finally{e.active=!1}}async function $t(r,t,e){let o=!0,n={analyze:!1,docs:!1,scss:!1},s=null,i,a=I("Activating watch mode...").start(),l={analyze:async()=>{let{wcaInput:c,wcaOutput:d,skipDocs:f}=t;if(f){let g=I("Skipping component analysis...").start();return setTimeout(()=>{g.succeed("Component analysis skipped.")},0),!0}let p=I("Detective work: analyzing components...").start();try{return await ie(c,d),p.succeed("Component analysis complete! API generated."),!0}catch(g){return p.fail("Analysis hiccup! Something went wrong."),console.error("Component analysis error:",g),!1}},docs:async()=>{if(U)return!1;if(t.skipDocs){let d=I("Skipping docs generation...").start();return setTimeout(()=>{d.succeed("Docs generation skipped.")},0),!0}let c=I("Refreshing docs...").start();try{return await le(t),c.succeed("Documentation refreshed!"),!0}catch(d){c.fail("Docs stumble! Couldn't refresh."),console.error("Documentation rebuild error:",d)}},scss:async()=>{if(U)return!1;try{return await R(),!0}catch(c){return console.error("Demo SCSS compilation error:",c),!1}}},m=()=>{o&&n.analyze&&n.docs&&n.scss&&typeof e=="function"&&(o=!1,e())};function u(c=1e3){s&&clearTimeout(s),s=setTimeout(async()=>{setTimeout(async()=>{n.analyze=await De("analyze",l.analyze),setTimeout(async()=>{n.docs=await De("docs",l.docs),setTimeout(async()=>{n.scss=await De("scss",l.scss),m()},500)},1e3)},1e3)},c)}r.on("event",async c=>{switch(c.code){case"START":a.succeed("Watch mode active! Eyes peeled.");break;case"BUNDLE_START":if(ue.clear(),c.input)try{let d=Array.isArray(c.input)?c.input:typeof c.input=="string"?[c.input]:typeof c.input=="object"&&c.input!==null?Object.values(c.input):[];for(let f of d)typeof f=="string"&&!Wr(f)&&ue.add(At.normalize(f))}catch(d){console.error("Error processing input paths:",d)}i=I("Weaving bundles...").start(),U=!0;break;case"BUNDLE_END":i&&i.succeed(`Bundle ${Array.isArray(c.input)?`of ${c.input.join("& ")} `:""}done in ${c.duration}ms! \u{1F680}`),U=!1,ue.size>0&&u();break;case"END":break;case"ERROR":U=!1,i?i.fail(`Oops! Bundle hit a snag: ${c.error.message}`):I().fail(`Watch mode hiccup: ${c.error.message}`),ue.clear();break}})}function vt(r,t){return F(r),t&&F(t),te(),r}async function Vr(r){let t=xe(r),e=G(r);r.dev||t.config.plugins.push(qr()),await le(r),await R(),await kt(t.config,e.configs)}async function Jr(r){let{dev:t}=r,e=xe({...r,watch:!0}),o=G({...r,watch:!0}),n=zr([e.config,...o.configs]);$t(n,r,t?async()=>oe(r):void 0);let s=await import("chokidar"),i=!1,a=!1,l=null,m=s.watch("./demo/**/*.scss",{ignoreInitial:!0,ignored:["**/demo/**/*.min.css"],awaitWriteFinish:{stabilityThreshold:500,pollInterval:100}});return m.on("all",()=>{l&&clearTimeout(l),l=setTimeout(async()=>{if(i){a=!0;return}i=!0;try{await R()}catch(u){console.error("Demo SCSS watch compilation error:",u)}finally{i=!1,a&&(a=!1,m.emit("all"))}},500)}),vt(n,m),n}async function me(r={}){try{let{watch:t}=r;return bt(),t?await Jr(r):await Vr(r)}catch(t){throw new Error(`Build failed: ${t.message}`)}}var H=Kr.command("dev").description("Runs development server for auro components");H=X(H);H=Z(H);var Xs=H.action(async r=>{try{let t=Et("Initializing...");r.watch?(t.text="Waiting for changes...",t.spinner="bouncingBar",t.color="green"):t.text=r.docs===!1?"Building component (docs disabled)":"Building component",t.start(),r.watch||t.succeed("Build completed!"),await me({...r,dev:!0,watch:r.watch})}catch(t){Et().fail(`Build failed: ${t.message}`),console.error(t),process.exit(1)}});import{program as Yr}from"commander";import Ct from"ora";var Oe=Yr.command("build").description("Builds auro components");Oe=X(Oe);var oi=Oe.action(async r=>{try{let t=Ct("Initializing...");r.watch?(t.text="Waiting for changes...",t.spinner="bouncingBar",t.color="green"):t.text=r.docs===!1?"Building component (docs disabled)":"Building component",t.start(),await me(r),r.watch||t.succeed("Build completed!")}catch(t){Ct().fail(`Build failed: ${t.message}`),console.error(t),process.exit(1)}});import{exec as Xr}from"node:child_process";import Tt from"node:path";import Zr from"node:process";import{fileURLToPath as Qr}from"node:url";import eo from"node:util";import{program as to}from"commander";import ro from"inquirer";var pi=to.command("migrate").description("Script runner to perform repetitive code change tasks").requiredOption("-i, --id <string>","Select the migration you would like to run by id").option("-m, --multi-gitter","Run the migration on all repositories in the multi-gitter config").action(async r=>{let t=Qr(import.meta.url),e=Tt.dirname(t),o=Tt.resolve(e,"migrations",r.id);if(r.multiGitter){let n=eo.promisify(Xr);try{await n("command -v multi-gitter")}catch{console.error("multi-gitter is not installed."),Zr.exit(1)}(await ro.prompt([{type:"confirm",name:"dryRun",message:"Run migration in dry-run mode? (no changes will be committed)",default:!0}])).dryRun?v(`multi-gitter run ${o}/script.sh --config "${o}/multi-gitter.yml" --dry-run`):v(`multi-gitter run ${o}/script.sh --config "${o}/multi-gitter.yml"`)}else v(`${o}/script.sh`)});import Pt from"node:process";import{program as ao}from"commander";import{readFile as co,writeFile as lo}from"node:fs/promises";import{Logger as W}from"@aurodesignsystem/auro-library/scripts/utils/logger.mjs";import Ne from"node:fs/promises";import je from"node:path";import{Octokit as oo}from"@octokit/rest";import E from"ora";import{processContentForFile as no,templateFiller as so}from"@aurodesignsystem/auro-library/scripts/utils/sharedFileProcessorUtils.mjs";async function St(r,t){let e=new oo({auth:process.env.GITHUB_TOKEN||""});try{let n=(await e.request("GET /repos/{owner}/{repo}/contents/{path}",{ref:t,owner:"AlaskaAirlines",repo:"auro-templates",path:r,headers:{"X-GitHub-Api-Version":"2022-11-28"}})).data;if(typeof n!="object"||!Array.isArray(n)){let s=`Unexpected response format: ${JSON.stringify(n)}`;throw E().start().fail(s),new Error("Failed to retrieve folder items")}return n}catch(o){let n=E().start();throw o.status===404?n.fail(`Template '${r.split("/")[1]}' not found`):n.fail(`Error accessing template: ${o.message}`),o}}async function Rt({folderItems:r,templatePathToReplace:t,rootDir:e,ref:o}){let n=[];for(let s of r){if(s.type=="dir"){let m=E(`Processing directory: ${s.path}`).start(),u=await St(s.path,o);m.succeed(`Found ${u.length} additional items in ${s.path}`);let c=await Rt({folderItems:u,templatePathToReplace:t,rootDir:e,ref:o});n.push(...c);continue}let i=s.path.replace(`${t}/`,""),a=`${e}/.github/${i}`,l={identifier:s.name,input:{remoteUrl:s.download_url||"",fileName:a,overwrite:!0},output:a};n.push(l)}return n}async function io(r){try{await Ne.rm(r,{recursive:!0,force:!0}),E().start().succeed(`Successfully removed directory: ${r}`)}catch(t){throw E().start().fail(`Error removing directory ${r}: ${t.message}`),t}}async function xt(r,t="",e=!0){try{let o=await Ne.stat(r),n=je.basename(r);if(!o.isDirectory())return`${t}${e?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 "}${n}
|
|
26
26
|
`;let s=`${t}${e?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 "}${n}/
|
|
27
27
|
`;try{let a=(await Ne.readdir(r)).sort();for(let l=0;l<a.length;l++){let m=a[l],u=je.join(r,m),c=l===a.length-1,d=t+(e?" ":"\u2502 ");s+=await xt(u,d,c)}}catch{s+=`${t}${e?" ":"\u2502 "}\u2514\u2500\u2500 [Permission denied or error reading directory]
|
|
28
28
|
`}return s}catch(o){return`${t}${e?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 "}[Error: ${o}]
|
|
@@ -30,7 +30,7 @@ ${O.trimEnd()}
|
|
|
30
30
|
`).replace(/\n\n/gu,`
|
|
31
31
|
`);await lo(e,n,{encoding:"utf-8"}),(n.includes("\r")||n.includes(`
|
|
32
32
|
|
|
33
|
-
`))&&W.error("CODEOWNERS file still has Windows line endings.")}catch(e){throw W.error(`Error processing CODEOWNERS file: ${e.message}`),e}}catch(e){W.error(`Sync operation failed: ${e.message}`),Pt.exit(1)}});import de from"node:fs";import
|
|
33
|
+
`))&&W.error("CODEOWNERS file still has Windows line endings.")}catch(e){throw W.error(`Error processing CODEOWNERS file: ${e.message}`),e}}catch(e){W.error(`Sync operation failed: ${e.message}`),Pt.exit(1)}});import de from"node:fs";import q from"node:path";import{Logger as Ot}from"@aurodesignsystem/auro-library/scripts/utils/logger.mjs";import{program as uo}from"commander";import{glob as mo}from"glob";var Dt=(r,t)=>{let e=(r.match(/static register\(name \= (.+)\)/)||r.match(/customElements.get\((.+?)\)/))[1],o=r.match(/export class (.+) extends/)?.[1],n=r.match(/\/\*\*((.|\n)*?)(\*\n|\*\/|[@])/)?.[1]||"";return!e||!o?r:`
|
|
34
34
|
import { ${o} } from '${t}';
|
|
35
35
|
|
|
36
36
|
/**${n}*/
|
|
@@ -39,31 +39,31 @@ class ${o}WCA extends ${o} {}
|
|
|
39
39
|
if (!customElements.get(${e})) {
|
|
40
40
|
customElements.define(${e}, ${o}WCA);
|
|
41
41
|
}
|
|
42
|
-
`};var pe=
|
|
42
|
+
`};var pe=q.resolve(process.cwd(),"./scripts/wca");async function po(r){try{return(await Promise.all(r.map(e=>mo(e)))).flat()}catch(t){throw console.error("Error processing glob patterns:",t),t}}async function fo(r){de.existsSync(pe)||await de.promises.mkdir(pe,{recursive:!0});for(let t of r){let e=q.resolve(process.cwd(),t),o=await de.promises.readFile(e,"utf-8"),n=q.resolve(pe,`${q.basename(t)}`),s=Dt(o,q.relative(pe,t));await de.promises.writeFile(n,s)}}async function go(){let r=await po(["./src/auro-*.js"]);await fo(r)}var ji=uo.command("wca-setup").description("Set up WCA (Web Component Analyzer) for the project").action(()=>{go().then(()=>{Ot.success("WCA setup completed successfully.")}).catch(r=>{Ot.error(`WCA setup failed: ${r.message}`)})});import{program as vo}from"commander";import _t from"chalk";import Mt from"ora";import{appendFile as ho,readFile as yo}from"node:fs/promises";import{Logger as h}from"@aurodesignsystem/auro-library/scripts/utils/logger.mjs";import{simpleGit as wo}from"simple-git";var y;try{y=wo({baseDir:process.cwd(),binary:"git",maxConcurrentProcesses:1})}catch(r){h.error(`Failed to initialize git: ${r}`),y={}}var x=class r{static async checkGitignore(t){if(t==="")return!1;try{return(await yo(".gitignore","utf-8")).includes(t)}catch(e){return h.error(`Error reading file: ${e}`),!1}}static async getCommitMessages(t=""){try{let e=t;e||(e=(await y.branchLocal()).current);let o="main",n="";if(!!process.env.GITHUB_ACTIONS){o=process.env.GITHUB_BASE_REF||"main";try{if(await y.fetch("origin",o),e!=="HEAD")try{await y.raw(["rev-parse","--verify",`origin/${e}`])}catch{await y.fetch("origin",e)}let i=e==="HEAD"?"HEAD":`origin/${e}`;n=`${(await y.raw(["merge-base",`origin/${o}`,i])).trim()}..${i}`}catch(i){h.warn(`Error setting up commit range in CI: ${i}`);let a=e==="HEAD"?"HEAD":`origin/${e}`;n=`origin/${o}..${a}`}}else try{try{await y.raw(["rev-parse","--verify",`origin/${o}`])}catch{h.info(`Fetching ${o} from origin`),await y.fetch("origin",o)}if(e!=="HEAD")try{await y.raw(["rev-parse","--verify",e])}catch{await y.fetch("origin",e)}n=`${(await y.raw(["merge-base",`origin/${o}`,e])).trim()}..${e}`}catch(i){h.warn(`Error determining commits locally: ${i}`),n=`${e}~10..${e}`}return await r.getFormattedCommits(n)}catch(e){return h.error(`Error getting commit messages: ${e}`),[]}}static async getRepoOwnerAndName(){try{let t=await y.getRemotes(!0);if(t.length===0)return h.warn("No remotes found"),null;let e=t.find(n=>n.name==="origin")||t[0],o=e.refs.fetch||e.refs.push;return r.parseGitUrl(o)}catch(t){return h.error(`Error getting repo owner and name: ${t}`),null}}static async getCurrentBranchName(){try{return(await y.branchLocal()).current||null}catch(t){return h.error(`Error getting current branch name: ${t}`),null}}static parseGitUrl(t){let e;return t.includes("@")&&t.includes(":")&&(e=t.match(/@([^:]+):([^/]+)\/(.+?)(?:\.git)?$/),e)?{owner:e[2],repo:e[3]}:(e=t.match(/https?:\/\/(?:[^@]+@)?[^/]+\/([^/]+)\/(.+?)(?:\.git)?$/),e?{owner:e[1],repo:e[2]}:(h.warn(`Could not parse git URL: ${t}`),null))}static async getFormattedCommits(t){let o=(await y.raw(["log","--pretty=format:COMMIT_START%n%H%n%ad%n%an%n%s%n%b%nCOMMIT_END","--date=short",t])).split(`COMMIT_START
|
|
43
43
|
`).filter(s=>s.trim()!==""),n=[];for(let s of o){let i=s.split(`
|
|
44
44
|
`);if(i.length>=4){let a=i[0],l=i[1],m=i[2],u=i[3],c=i.slice(4).filter(b=>b!=="COMMIT_END"),d=c.length>0?c.join(""):"",f=a.substring(0,7),p=u.match(/^(feat|fix|docs|style|refactor|perf|test|build|ci|chore)(\(.+\))?:/),g=p?p[1]:"unknown";d.includes("BREAKING CHANGE")&&(g="breaking"),n.push({type:g,hash:f,date:l,subject:u,body:d,message:`${u}${d?`
|
|
45
45
|
|
|
46
46
|
${d}`:""}`,author_name:m})}}return n}static async addToGitignore(t,e=!0){await r.checkGitignore(t).then(async o=>{if(o)h.warn(`${t} already exists`);else try{await ho(".gitignore",`
|
|
47
|
-
${t}`),e&&h.success(`${t} added to .gitignore`)}catch(n){h.error(n)}})}static async removeFromGitCache(t){try{await y.rmKeepLocal(t),h.success(`${t.join(", ")} are removed from git cache`)}catch(e){h.error(e)}}static async createBranch(t){try{await y.checkoutLocalBranch(t),h.success(`Created and switched to ${t} branch`)}catch(e){h.error(e)}}static async commitStagedFiles(t){try{await y.add("."),await y.commit(t),h.success(`Committed with message: ${t}`)}catch(e){h.error(e)}}};import w from"chalk";var bo=60,ko=100;function
|
|
48
|
-
`,n=""),n=`${n}${s} `;return n.length>0&&(o+=n.trim()),o}function jt(r){for(let t of r){console.log("\u2500".repeat(60));let e=Nt(t.subject,bo),o=Nt(t.body,ko);console.log(w.bold(`${
|
|
47
|
+
${t}`),e&&h.success(`${t} added to .gitignore`)}catch(n){h.error(n)}})}static async removeFromGitCache(t){try{await y.rmKeepLocal(t),h.success(`${t.join(", ")} are removed from git cache`)}catch(e){h.error(e)}}static async createBranch(t){try{await y.checkoutLocalBranch(t),h.success(`Created and switched to ${t} branch`)}catch(e){h.error(e)}}static async commitStagedFiles(t){try{await y.add("."),await y.commit(t),h.success(`Committed with message: ${t}`)}catch(e){h.error(e)}}};import w from"chalk";var bo=60,ko=100;function z(r){switch(r){case"breaking":return w.bold.red(r);case"feat":return w.bold.green(r);case"fix":return w.bold.green(r);case"perf":return w.bold.green(r);case"docs":return w.bold.cyan(r);case"style":return w.bold.cyan(r);case"refactor":return w.bold.cyan(r);case"test":return w.bold.cyan(r);case"build":return w.bold.cyan(r);case"ci":return w.bold.cyan(r);case"chore":return w.bold.cyan(r);default:return w.bold.white(r)}}function Nt(r,t){if(!r)return"";if(r.length<=t)return r;let e=r.split(" "),o="",n="";for(let s of e)(n+s).length>t&&n.length>0&&(o+=`${n.trim()}
|
|
48
|
+
`,n=""),n=`${n}${s} `;return n.length>0&&(o+=n.trim()),o}function jt(r){for(let t of r){console.log("\u2500".repeat(60));let e=Nt(t.subject,bo),o=Nt(t.body,ko);console.log(w.bold(`${z(t.type)}`)),console.log(w.dim(`${t.hash} | ${t.date} | ${t.author_name}`)),console.log(w.bold(`${w.white(e)}`)),t.body&&console.log(w.dim(o))}console.log("\u2500".repeat(60)),console.log(`
|
|
49
49
|
`)}import*as V from"@actions/github";async function Fe(){try{let r=process.env.GITHUB_TOKEN;if(!r)throw new Error("GITHUB_TOKEN environment variable is not set");if(!process.env.GITHUB_REPOSITORY||!process.env.GITHUB_EVENT_PATH)throw new Error("This function can only be used in a GitHub Actions environment");let t=V.getOctokit(r),{context:e}=V;if(!e.payload.pull_request)throw new Error("No pull request found in the GitHub context");let[o,n]=process.env.GITHUB_REPOSITORY.split("/"),s=e.payload.pull_request.number,{data:i}=await t.rest.issues.listLabelsOnIssue({owner:o,repo:n,issue_number:s});return i.map(a=>a.name)}catch(r){throw r instanceof Error?new Error(`Failed to get existing labels: ${r.message}`):r}}async function Ft(r){try{let t=process.env.GITHUB_TOKEN;if(!t)throw new Error("GITHUB_TOKEN environment variable is not set");if(!process.env.GITHUB_REPOSITORY||!process.env.GITHUB_EVENT_PATH)throw new Error("This function can only be used in a GitHub Actions environment");let e=V.getOctokit(t),{context:o}=V;if(!o.payload.pull_request)throw new Error("No pull request found in the GitHub context");let[n,s]=process.env.GITHUB_REPOSITORY.split("/"),i=o.payload.pull_request.number,a=`semantic-status: ${r}`,l=await Fe();if(l.includes(a))return;let m=l.filter(u=>u.startsWith("semantic-status:")&&u!==a);for(let u of m)await e.rest.issues.removeLabel({owner:n,repo:s,issue_number:i,name:u});await e.rest.issues.addLabels({owner:n,repo:s,issue_number:i,labels:[a]});return}catch(t){throw t instanceof Error?new Error(`Failed to apply label: ${t.message}`):t}}var Ao=["feat","fix","breaking","perf"];function _e(r,t=!0){let e=`### In this release
|
|
50
50
|
`;for(let o of r)if(e+=`- ${o.hash} ${o.subject}
|
|
51
51
|
`,o.body?.trim()){let s=o.body.trim().split(/\n+/).map(i=>i.trim()).filter(i=>i.length>0);for(let i of s){let a=i;a=a.replace(/([^\s])(AlaskaAirlines\/[a-zA-Z0-9-]+#\d+)/g,"$1 $2"),a=a.replace(/(AlaskaAirlines\/[a-zA-Z0-9-]+#\d+)([^\s])/g,"$1 $2"),e+=` - ${a}`}}return r.length===0?"":(t&&console.log(_t.green(`\u2713 Generating release notes for ${r.length} commits`)),e)}function Me(r,t=!0){let e=r.filter(n=>Ao.includes(n.type)),o;return t?o=e.length>0?e:r:o=e,o.length===0&&console.log(`No commits found to include in release notes.
|
|
52
52
|
`),o}async function Bt(r=!1,t=!1,e=!1){let o=Mt(`Checking commits...
|
|
53
|
-
`).start();try{let n=await x.getCommitMessages();if(e){o.succeed(`Total commits analyzed: ${n.length}`);let s=Me(n);console.log(_e(s));return}if(r&&jt(n),o.succeed(`Total commits analyzed: ${n.length}`),n.length!==0){let s=n.map(l=>l.type),a=Array.from(new Set(s)).map(l=>
|
|
53
|
+
`).start();try{let n=await x.getCommitMessages();if(e){o.succeed(`Total commits analyzed: ${n.length}`);let s=Me(n);console.log(_e(s));return}if(r&&jt(n),o.succeed(`Total commits analyzed: ${n.length}`),n.length!==0){let s=n.map(l=>l.type),a=Array.from(new Set(s)).map(l=>z(l)).join(", ");o.succeed(`Found commit types: ${a}`)}else o.info(`The list of commits is created by comparing the current branch
|
|
54
54
|
with the main branch. If you are on a new branch, please
|
|
55
|
-
make sure to commit some changes before running this command.`);t&&await $o(n,o)}catch(n){o.fail("Error getting commit messages"),console.error(n)}}async function $o(r,t){let e=["breaking","feat","fix","perf","docs","style","refactor","test","build","ci","chore"],o=r.map(i=>i.type).filter(i=>e.includes(i)),n=null,s=Number.POSITIVE_INFINITY;for(let i of o){let a=e.indexOf(i);a<s&&(s=a,n=i)}if(n){let i=Mt("Checking existing labels on pull request...").start();try{if((await Fe()).includes(`semantic-status: ${n}`)){i.info(`Label "semantic-status: ${
|
|
56
|
-
`,"utf8"),o.succeed(`Package.json updated to use ${P.green(u)} and ${P.green(l)}`),process.exit(0)}catch(n){o.fail(`Failed to update package.json: ${n}`),process.exit(1)}},So=(r,t,e)=>new Promise(o=>{try{let a=function(l){if(l.statusCode!==200){e.info(`Package not found. Status code: ${P.red(l.statusCode)}, defaulting to version 0`),o(0);return}e.text="Processing version information...";let m="";l.on("data",u=>{m+=u}),l.on("end",()=>{try{let u=JSON.parse(m),c=u.versions?Object.keys(u.versions):[];e.text="Calculating next version number...";let d=-1,f=new RegExp(`^${r}\\.(\\d+)$`);for(let p of c){let g=p.match(f);if(g){let b=Number.parseInt(g[1],10);d=Math.max(d,b)}}d>=0?e.info(`Found existing version ${P.green(`${r}.${d}`)}. Incrementing to ${P.green(`${r}.${d+1}`)}`):e.info(`No existing version found for ${P.green(r)}. Starting with ${P.green(`${r}.0`)}`),o(d+1)}catch(u){e.warn(`Failed to parse NPM registry response: ${u instanceof Error?u.message:"Unknown error"}, defaulting to version 0`),o(0)}})};var n=a;let s=`https://registry.npmjs.org/${t}`,i=Lt(s,{headers:{Accept:"application/json"}},l=>{if((l.statusCode===301||l.statusCode===302)&&l.headers.location){e.info(`Following redirect to ${l.headers.location}...`);try{Lt(l.headers.location,{headers:{Accept:"application/json"}},a).on("error",m=>{e.warn(`Error following redirect: ${m.message}, defaulting to version 0`),o(0)}).end()}catch(m){e.warn(`Redirect request failed: ${m instanceof Error?m.message:"Unknown error"}, defaulting to version 0`),o(0)}return}a(l)});i.on("error",l=>{e.warn(`Request error: ${l.message}, defaulting to version 0`),o(0)}),i.end()}catch{e.warn("Error checking version in npm registry, defaulting to version 0"),o(0)}});import Be from"node:path";import{fileURLToPath as Ro}from"node:url";import{program as xo}from"commander";import Io from"open";var Po=Ro(import.meta.url),Do=Be.resolve(Be.dirname(Po),".."),da=xo.command("test").option("-w, --watch","Set watch number for the test").option("-c, --coverage-report","Generate coverage report").option("-o, --open","Open the coverage report in the browser").option("-f, --files <String|String[]>","Test files glob pattern").description("Run the web test runner to test the component library").action(async r=>{let e=`npx wtr --config "${Be.join(Do,"dist","configs","web-test-runner.config.mjs")}"`,o=`${process.cwd()}/coverage/index.html`;if(r.coverageReport&&(e+=" --coverage"),r.watch&&(e+=" --watch"),r.files){let n=Array.isArray(r.files)?r.files.join(" "):r.files;e+=` --files "${n}"`}v(e),r.open&&await Io(o)});import He from"node:fs/promises";import
|
|
55
|
+
make sure to commit some changes before running this command.`);t&&await $o(n,o)}catch(n){o.fail("Error getting commit messages"),console.error(n)}}async function $o(r,t){let e=["breaking","feat","fix","perf","docs","style","refactor","test","build","ci","chore"],o=r.map(i=>i.type).filter(i=>e.includes(i)),n=null,s=Number.POSITIVE_INFINITY;for(let i of o){let a=e.indexOf(i);a<s&&(s=a,n=i)}if(n){let i=Mt("Checking existing labels on pull request...").start();try{if((await Fe()).includes(`semantic-status: ${n}`)){i.info(`Label "semantic-status: ${z(n)}" already exists on the pull request.`);return}i.text="Applying label to pull request...",await Ft(n),i.succeed(`Label "semantic-status: ${z(n)}" applied to the pull request.`)}catch(a){let l=a instanceof Error?a.message:String(a);i.fail(l)}}else t.warn(_t.yellow("No semantic commit type found to apply as label."))}var Zi=vo.command("check-commits").alias("cc").option("-l, --set-label","Set label on the pull request based on the commit message type").option("-d, --debug","Display detailed commit information for debugging").option("-r, --release-notes","Generate release notes based on commit messages").description("Check commits in the local repository for the types of semantic commit messages made and return the results.").action(async r=>{await Bt(r.debug,r.setLabel,r.releaseNotes)});import Gt from"node:fs";import{get as Lt}from"node:https";import P from"chalk";import{program as Eo}from"commander";import Co from"ora";var sa=Eo.command("pr-release").option("-n, --namespace <package-namespace>","Set namespace of the package release","@aurodesignsystem-dev").option("-p, --pr-number <number>","Set pull request number for the release","0").description("Generate the package version based off of PR number then update the package.json file. Note: this does not publish the package.").action(async r=>{await To(r)}),To=async r=>{let{namespace:t,prNumber:e}=r,o=Co("Updating package.json").start();try{let n="package.json",s=JSON.parse(Gt.readFileSync(n,"utf8"));o.text="Checking npm registry for version information...";let i=`0.0.0-pr${e}`,a=s.name.split("/")[1],l=`${t}/${a}`,m=await So(i,l,o),u=`${i}.${m}`;s.name=l,s.version=u,o.text="Writing updated package.json...",Gt.writeFileSync(n,`${JSON.stringify(s,null,2)}
|
|
56
|
+
`,"utf8"),o.succeed(`Package.json updated to use ${P.green(u)} and ${P.green(l)}`),process.exit(0)}catch(n){o.fail(`Failed to update package.json: ${n}`),process.exit(1)}},So=(r,t,e)=>new Promise(o=>{try{let a=function(l){if(l.statusCode!==200){e.info(`Package not found. Status code: ${P.red(l.statusCode)}, defaulting to version 0`),o(0);return}e.text="Processing version information...";let m="";l.on("data",u=>{m+=u}),l.on("end",()=>{try{let u=JSON.parse(m),c=u.versions?Object.keys(u.versions):[];e.text="Calculating next version number...";let d=-1,f=new RegExp(`^${r}\\.(\\d+)$`);for(let p of c){let g=p.match(f);if(g){let b=Number.parseInt(g[1],10);d=Math.max(d,b)}}d>=0?e.info(`Found existing version ${P.green(`${r}.${d}`)}. Incrementing to ${P.green(`${r}.${d+1}`)}`):e.info(`No existing version found for ${P.green(r)}. Starting with ${P.green(`${r}.0`)}`),o(d+1)}catch(u){e.warn(`Failed to parse NPM registry response: ${u instanceof Error?u.message:"Unknown error"}, defaulting to version 0`),o(0)}})};var n=a;let s=`https://registry.npmjs.org/${t}`,i=Lt(s,{headers:{Accept:"application/json"}},l=>{if((l.statusCode===301||l.statusCode===302)&&l.headers.location){e.info(`Following redirect to ${l.headers.location}...`);try{Lt(l.headers.location,{headers:{Accept:"application/json"}},a).on("error",m=>{e.warn(`Error following redirect: ${m.message}, defaulting to version 0`),o(0)}).end()}catch(m){e.warn(`Redirect request failed: ${m instanceof Error?m.message:"Unknown error"}, defaulting to version 0`),o(0)}return}a(l)});i.on("error",l=>{e.warn(`Request error: ${l.message}, defaulting to version 0`),o(0)}),i.end()}catch{e.warn("Error checking version in npm registry, defaulting to version 0"),o(0)}});import Be from"node:path";import{fileURLToPath as Ro}from"node:url";import{program as xo}from"commander";import Io from"open";var Po=Ro(import.meta.url),Do=Be.resolve(Be.dirname(Po),".."),da=xo.command("test").option("-w, --watch","Set watch number for the test").option("-c, --coverage-report","Generate coverage report").option("-o, --open","Open the coverage report in the browser").option("-f, --files <String|String[]>","Test files glob pattern").description("Run the web test runner to test the component library").action(async r=>{let e=`npx wtr --config "${Be.join(Do,"dist","configs","web-test-runner.config.mjs")}"`,o=`${process.cwd()}/coverage/index.html`;if(r.coverageReport&&(e+=" --coverage"),r.watch&&(e+=" --watch"),r.files){let n=Array.isArray(r.files)?r.files.join(" "):r.files;e+=` --files "${n}"`}v(e),r.open&&await Io(o)});import He from"node:fs/promises";import qt from"node:path";import{program as Bo}from"commander";import Go from"inquirer";import We from"ora";import Oo from"node:fs/promises";import No from"node:path";import jo from"ora";var Fo={"auth-type":"workspace-token","author-email":null,"author-name":null,"base-branch":"main","base-url":null,"clone-dir":".gitter-temp","code-search":null,concurrent:4,"conflict-strategy":"replace",draft:!1,"dry-run":!0,"fetch-depth":1,fork:!1,"fork-owner":null,"git-type":"go",group:null,"include-subgroups":!1,insecure:!1,interactive:!1,labels:null,"log-file":"'-'","log-format":"'text'","log-level":"'error'","max-reviewers":0,"max-team-reviewers":0,org:null,output:"'-'","plain-output":!1,platform:"github",project:null,"push-only":!1,repo:["AlaskaAirlines/auro-accordion","AlaskaAirlines/auro-alert","AlaskaAirlines/auro-avatar","AlaskaAirlines/auro-background","AlaskaAirlines/auro-backtotop","AlaskaAirlines/auro-button","AlaskaAirlines/auro-badge","AlaskaAirlines/auro-banner","AlaskaAirlines/auro-card","AlaskaAirlines/auro-carousel","AlaskaAirlines/auro-datetime","AlaskaAirlines/auro-dialog","AlaskaAirlines/auro-drawer","AlaskaAirlines/auro-flight","AlaskaAirlines/auro-flightline","AlaskaAirlines/auro-header","AlaskaAirlines/auro-hyperlink","AlaskaAirlines/auro-icon","AlaskaAirlines/auro-loader","AlaskaAirlines/auro-lockup","AlaskaAirlines/auro-nav","AlaskaAirlines/auro-pane","AlaskaAirlines/auro-popover","AlaskaAirlines/auro-sidenav","AlaskaAirlines/auro-skeleton","AlaskaAirlines/auro-slideshow","AlaskaAirlines/auro-table","AlaskaAirlines/auro-tabs","AlaskaAirlines/auro-toast"],"repo-exclude":null,"repo-include":null,"repo-search":null,reviewers:null,"skip-forks":!1,"skip-pr":!1,"skip-repo":null,"ssh-auth":!1,"team-reviewers":null};function _o(r){return Object.entries(r).map(([t,e])=>Array.isArray(e)?`${t}:
|
|
57
57
|
- ${e.join(`
|
|
58
58
|
- `)}`:typeof e=="object"&&e!==null?`${t}:
|
|
59
59
|
${Object.entries(e).map(([o,n])=>` ${o}: ${n}`).join(`
|
|
60
60
|
`)}`:`${t}: ${e}`).join(`
|
|
61
|
-
`)}async function Ut(r){let t=jo("Writing multi-gitter configuration...").start(),e=_o(Fo),o=No.join(r,"multi-gitter_DEPENDENCY_TREE.yml");try{await Oo.writeFile(o,e,"utf8"),t.succeed(`Multi-gitter configuration written to ${o}`)}catch(n){t.fail("Error writing multi-gitter configuration:"),console.error(n)}}import Ge from"node:fs";function Ht(r){let t={},e=[],o=[],n=[];for(let s in r)t[s]=r[s].dependsOn.length;for(let s in t)t[s]===0&&n.push(s);for(;n.length>0;){o=[];let s=n.length;for(let i=0;i<s;i++){let a=n.shift();o.push(a);for(let l of r[a].dependentPackages)t[l]--,t[l]===0&&n.push(l)}e.push(o)}if(e.flat().length!==Object.keys(r).length)throw new Error("Circular dependency detected!");return e}function Mo(r){return Ge.readdirSync(r).filter(t=>t.endsWith(".json"))}async function Wt(r,t=[]){console.log(t);let e={},o=Mo(r);for(let n of o){if(n==="dependencyTree.json")continue;let s=Ge.readFileSync(`${r}/${n}`,"utf-8"),i=JSON.parse(s),a=i.name,l=Object.keys(i.peerDependencies),m=Object.keys(i.devDependencies),u=Object.keys(i.dependencies);e[a]||(e[a]={dependsOn:[],dependentPackages:[]});let c=[...l,...m,...u];e[a].dependsOn=[...new Set(c)];for(let d of c)e[d]||(e[d]={dependsOn:[],dependentPackages:[]}),e[d].dependentPackages.includes(a)||e[d].dependentPackages.push(a)}if(t.length){let n=new Set;for(let[i,a]of Object.entries(e))a.dependsOn.some(l=>t.includes(l))&&n.add(i);for(let i of t)e[i]&&n.add(i);let s={};for(let i of n)s[i]={dependsOn:e[i].dependsOn.filter(a=>n.has(a)),dependentPackages:e[i].dependentPackages.filter(a=>n.has(a))};e=s}else console.log("No target dependencies provided - using all packages.");return Ge.writeFileSync(`${r}/dependencyTree.json`,JSON.stringify(e,null,2)),e}var Le=Ae("run-migrations","config"),Ue=Ae("run-migrations","outputs");var
|
|
61
|
+
`)}async function Ut(r){let t=jo("Writing multi-gitter configuration...").start(),e=_o(Fo),o=No.join(r,"multi-gitter_DEPENDENCY_TREE.yml");try{await Oo.writeFile(o,e,"utf8"),t.succeed(`Multi-gitter configuration written to ${o}`)}catch(n){t.fail("Error writing multi-gitter configuration:"),console.error(n)}}import Ge from"node:fs";function Ht(r){let t={},e=[],o=[],n=[];for(let s in r)t[s]=r[s].dependsOn.length;for(let s in t)t[s]===0&&n.push(s);for(;n.length>0;){o=[];let s=n.length;for(let i=0;i<s;i++){let a=n.shift();o.push(a);for(let l of r[a].dependentPackages)t[l]--,t[l]===0&&n.push(l)}e.push(o)}if(e.flat().length!==Object.keys(r).length)throw new Error("Circular dependency detected!");return e}function Mo(r){return Ge.readdirSync(r).filter(t=>t.endsWith(".json"))}async function Wt(r,t=[]){console.log(t);let e={},o=Mo(r);for(let n of o){if(n==="dependencyTree.json")continue;let s=Ge.readFileSync(`${r}/${n}`,"utf-8"),i=JSON.parse(s),a=i.name,l=Object.keys(i.peerDependencies),m=Object.keys(i.devDependencies),u=Object.keys(i.dependencies);e[a]||(e[a]={dependsOn:[],dependentPackages:[]});let c=[...l,...m,...u];e[a].dependsOn=[...new Set(c)];for(let d of c)e[d]||(e[d]={dependsOn:[],dependentPackages:[]}),e[d].dependentPackages.includes(a)||e[d].dependentPackages.push(a)}if(t.length){let n=new Set;for(let[i,a]of Object.entries(e))a.dependsOn.some(l=>t.includes(l))&&n.add(i);for(let i of t)e[i]&&n.add(i);let s={};for(let i of n)s[i]={dependsOn:e[i].dependsOn.filter(a=>n.has(a)),dependentPackages:e[i].dependentPackages.filter(a=>n.has(a))};e=s}else console.log("No target dependencies provided - using all packages.");return Ge.writeFileSync(`${r}/dependencyTree.json`,JSON.stringify(e,null,2)),e}var Le=Ae("run-migrations","config"),Ue=Ae("run-migrations","outputs");var zt=["@aurodesignsystem/auro-accordion","@aurodesignsystem/auro-alert","@aurodesignsystem/auro-avatar","@aurodesignsystem/auro-background","@aurodesignsystem/auro-backtotop","@aurodesignsystem/auro-button","@aurodesignsystem/auro-badge","@aurodesignsystem/auro-banner","@aurodesignsystem/auro-card","@aurodesignsystem/auro-carousel","@aurodesignsystem/auro-datetime","@aurodesignsystem/auro-dialog","@aurodesignsystem/auro-drawer","@aurodesignsystem/auro-formkit","@aurodesignsystem/auro-flight","@aurodesignsystem/auro-flightline","@aurodesignsystem/auro-header","@aurodesignsystem/auro-hyperlink","@aurodesignsystem/auro-icon","@aurodesignsystem/auro-loader","@aurodesignsystem/auro-lockup","@aurodesignsystem/auro-nav","@aurodesignsystem/auro-pane","@aurodesignsystem/auro-popover","@aurodesignsystem/auro-sidenav","@aurodesignsystem/auro-skeleton","@aurodesignsystem/auro-slideshow","@aurodesignsystem/auro-table","@aurodesignsystem/auro-tabs","@aurodesignsystem/auro-toast"],xa=[...zt,"@aurodesignsystem/auro-library","@aurodesignsystem/WebCoreStyleSheets","@aurodesignsystem/AuroDesignTokens","@aurodesignsystem/auro-cli","@alaskaairux/icons"];async function Lo(r){try{await He.mkdir(Ue,{recursive:!0}),await He.mkdir(Le,{recursive:!0})}catch(n){console.error("Failed to create output or config directories:",n),process.exit(1)}let t=We("Creating dependency tree...").start();t.text="Creating multi-gitter dependency tree configuration...",await Ut(Le),t.text="Scraping dependencies from Auro packages...";let o=`multi-gitter run "node ${$e("static","getAuroDeps.js")}" --config ${qt.join(Le,"multi-gitter_DEPENDENCY_TREE.yml")}`;try{await v(o)}catch(n){t.fail("Failed to generate dependency tree:"),console.error(n),process.exit(1)}return t.text="Generating dependency tree JSON file using packages...",await Wt(Ue,r),t.succeed("Dependency tree generated successfully."),qt.join(Ue,"dependencyTree.json")}var Uo=async r=>{let t=We("Loading dependency tree...").start(),e=JSON.parse(await He.readFile(r,"utf-8"));t.text="Processing dependency tree...";let o=Ht(e);return t.succeed("Dependency batches created successfully."),o},Ia=Bo.command("agent").action(async r=>{let t=await Go.prompt([{type:"select",name:"agentAction",message:"What agent action do you want to perform?",choices:[{name:"Run a migration on auro components",value:"run-migration"}],default:["run-migration"]},{type:"input",name:"migrationId",message:"What migration id do you want to run?",when:e=>e.agentAction==="run-migration",validate:e=>e.trim()!==""||"Migration id cannot be empty."},{type:"confirm",name:"useExisting",message:"Would you like to specify starting packages?",default:!0,transformer:e=>e?"Yes = Packages related to selections":"No = All packages",when:e=>e.agentAction==="run-migration"},{type:"checkbox",name:"startWithComponents",message:"Enter the components to start with (comma-separated, blank for all):",choices:zt.map(e=>({name:e.replace("@aurodesignsystem/",""),value:e})),when:e=>e.agentAction==="run-migration"&&e.useExisting}]);switch(t.agentAction){case"run-migration":{let e=We("Running migration...").start(),o=await Lo(t.startWithComponents);e.text="Getting dependency batches from tree...";let s=(await Uo(o)).map((i,a)=>`Batch ${a+1}
|
|
62
62
|
${i.map(l=>` - ${l.replace("@aurodesignsystem","AlaskaAirlines").replace("@alaskaairux/icons","AlaskaAirlines/Icons")}`).join(`
|
|
63
63
|
`)}`).join(`
|
|
64
64
|
|
|
65
|
-
`);console.log(s),e.text="Running migrations on dependency batches...",new Promise(i=>setTimeout(i,2e3)),e.succeed("Migration process completed successfully.");break}default:console.error("Unknown action selected.")}});import{writeFile as Ho}from"node:fs/promises";import Wo from"node:path";import ge from"node:process";import{Logger as
|
|
66
|
-
`,"utf-8")}catch(l){let m=l instanceof Error?l.message:String(l);t.fail(`Failed to write ${r.output}: ${m}`),ge.exit(1)}t.succeed(`Aggregated ${o.length}/${fe.length} component manifests (${n.modules?.length??0} modules) to ${r.output}`);let i=e.filter(l=>!l.manifest),a=i.filter(l=>l.transient);for(let l of i)
|
|
65
|
+
`);console.log(s),e.text="Running migrations on dependency batches...",new Promise(i=>setTimeout(i,2e3)),e.succeed("Migration process completed successfully.");break}default:console.error("Unknown action selected.")}});import{writeFile as Ho}from"node:fs/promises";import Wo from"node:path";import ge from"node:process";import{Logger as qe}from"@aurodesignsystem/auro-library/scripts/utils/logger.mjs";import{program as qo}from"commander";import zo from"ora";var fe=["@aurodesignsystem/auro-accordion","@aurodesignsystem/auro-alert","@aurodesignsystem/auro-avatar","@aurodesignsystem/auro-background","@aurodesignsystem/auro-backtotop","@aurodesignsystem/auro-badge","@aurodesignsystem/auro-banner","@aurodesignsystem/auro-button","@aurodesignsystem/auro-card","@aurodesignsystem/auro-carousel","@aurodesignsystem/auro-datetime","@aurodesignsystem/auro-dialog","@aurodesignsystem/auro-drawer","@aurodesignsystem/auro-flight","@aurodesignsystem/auro-flightline","@aurodesignsystem/auro-formkit","@aurodesignsystem/auro-header","@aurodesignsystem/auro-hyperlink","@aurodesignsystem/auro-icon","@aurodesignsystem/auro-loader","@aurodesignsystem/auro-lockup","@aurodesignsystem/auro-nav","@aurodesignsystem/auro-pane","@aurodesignsystem/auro-popover","@aurodesignsystem/auro-sidenav","@aurodesignsystem/auro-skeleton","@aurodesignsystem/auro-slideshow","@aurodesignsystem/auro-table","@aurodesignsystem/auro-tabs","@aurodesignsystem/auro-tail","@aurodesignsystem/auro-toast","@aurodesignsystem/auro-tokenlist"];var Vo="https://unpkg.com";async function Jo(r){let t=`${Vo}/${r}/custom-elements.json`,e;try{e=await fetch(t)}catch(o){let n=o instanceof Error?o.message:String(o);return{pkg:r,manifest:null,reason:`request failed (${n})`,transient:!0}}if(e.status===404)return{pkg:r,manifest:null,reason:"no custom-elements.json published"};if(!e.ok)return{pkg:r,manifest:null,reason:`HTTP ${e.status}`,transient:!0};try{return{pkg:r,manifest:await e.json()}}catch{return{pkg:r,manifest:null,reason:"custom-elements.json is not valid JSON",transient:!0}}}function ze(r,t){if(Array.isArray(r))return r.map(e=>ze(e,t));if(r&&typeof r=="object"){let e=r,o={};for(let[n,s]of Object.entries(e))n==="module"&&typeof s=="string"&&e.package==null?o[n]=`${t}/${s}`:o[n]=ze(s,t);return o}return r}function Ko(r){let t=[];for(let{pkg:o,manifest:n}of r)for(let s of n.modules??[]){let i=ze(s,o);i.path=`${o}/${s.path}`,t.push(i)}let e=new Set(r.map(o=>o.manifest.schemaVersion).filter(Boolean));return e.size>1&&qe.warn(`Merging mixed CEM schema versions: ${[...e].join(", ")}`),{schemaVersion:r[0]?.manifest.schemaVersion??"1.0.0",modules:t}}var Ga=qo.command("cem").description("Fetch every published Auro component's custom-elements.json and merge them into a single aggregated manifest").option("-o, --output <file>","Path to write the aggregated manifest","custom-elements.aggregate.json").action(async r=>{let t=zo(`Fetching manifests for ${fe.length} components...`).start(),e=await Promise.all(fe.map(l=>Jo(l))),o=[];for(let l of e)l.manifest&&o.push({pkg:l.pkg,manifest:l.manifest});o.length===0&&(t.fail("No component manifests could be fetched."),ge.exit(1)),t.text="Merging manifests...";let n=Ko(o),s=Wo.resolve(ge.cwd(),r.output);try{await Ho(s,`${JSON.stringify(n,null,2)}
|
|
66
|
+
`,"utf-8")}catch(l){let m=l instanceof Error?l.message:String(l);t.fail(`Failed to write ${r.output}: ${m}`),ge.exit(1)}t.succeed(`Aggregated ${o.length}/${fe.length} component manifests (${n.modules?.length??0} modules) to ${r.output}`);let i=e.filter(l=>!l.manifest),a=i.filter(l=>l.transient);for(let l of i)qe.info(`Skipped ${l.pkg}: ${l.reason}`);a.length>0&&(qe.error(`${a.length} component(s) failed to fetch transiently; the aggregate may be incomplete. Re-run to retry.`),ge.exit(1))});import Yo from"node:fs/promises";import Xo from"node:path";import{program as Zo}from"commander";import Qo from"ora";var Ve='# Auro Design System \u2014 AI Assistant Context\nAlaska Airlines open-source design system | https://auro.alaskaair.com\n\n## What is Auro?\nAuro is Alaska Airlines\' design system built on Web Components (Custom Elements v1) using the Lit library.\n- npm scope: `@aurodesignsystem/` (current), `@alaskaairux/` (legacy)\n- Framework-agnostic: works with React, Angular, Vue, Svelte, or plain HTML\n- Each component is a separate npm package\n- All components use the `<auro-*>` custom element tag\n\n## Rules for Writing Auro Code\n\n1. **Use `<auro-*>` custom element tags \u2014 never plain HTML equivalents**\n - \u2717 `<button>` \u2192 \u2713 `<auro-button>`\n - \u2717 `<a href="...">` \u2192 \u2713 `<auro-hyperlink href="...">`\n - \u2717 `<input>` \u2192 \u2713 `<auro-input>` (from auro-formkit)\n\n2. **Install and register each component before use**\n ```bash\n npm install @aurodesignsystem/auro-button\n ```\n ```js\n import "@aurodesignsystem/auro-button"; // registers <auro-button> globally\n ```\n\n3. **Props are HTML attributes in templates; camelCase properties in JS**\n ```html\n <auro-button disabled loading>Save</auro-button>\n ```\n ```js\n document.querySelector(\'auro-button\').loading = true;\n ```\n\n4. **Content goes in named slots, not innerHTML**\n ```html\n <auro-dialog>\n <span slot="header">Title</span>\n <div slot="content">Body content here</div>\n </auro-dialog>\n ```\n\n5. **Design tokens are CSS custom properties**\n ```bash\n npm install @aurodesignsystem/design-tokens\n ```\n ```css\n @import "@aurodesignsystem/design-tokens/dist/themes/CSSCustomProperties--bundled.css";\n ```\n Token naming: `--ds-basic-*` and `--ds-advanced-*` (e.g. `--ds-advanced-color-*`, `--ds-basic-color-*`)\n\n## Component Reference\n\n| Element Tag | Package | Description |\n|---|---|---|\n| `<auro-accordion>` | `@aurodesignsystem/auro-accordion` | Expandable content sections |\n| `<auro-alert>` | `@aurodesignsystem/auro-alert` | Inline status messages: error, warning, success, information |\n| `<auro-avatar>` | `@aurodesignsystem/auro-avatar` | User or entity avatar |\n| `<auro-background>` | `@aurodesignsystem/auro-background` | Themed background wrapper |\n| `<auro-backtotop>` | `@aurodesignsystem/auro-backtotop` | Scroll-to-top button |\n| `<auro-badge>` | `@aurodesignsystem/auro-badge` | Status or count badge |\n| `<auro-banner>` | `@aurodesignsystem/auro-banner` | Full-width promotional banner |\n| `<auro-button>` | `@aurodesignsystem/auro-button` | Interactive button; supports `loading`, `disabled`, `shape` |\n| `<auro-card>` | `@aurodesignsystem/auro-card` | Content card container |\n| `<auro-carousel>` | `@aurodesignsystem/auro-carousel` | Horizontally scrollable carousel |\n| `<auro-datetime>` | `@aurodesignsystem/auro-datetime` | Localized date and time formatting |\n| `<auro-dialog>` | `@aurodesignsystem/auro-dialog` | Modal dialog; slots: header, content, footer |\n| `<auro-drawer>` | `@aurodesignsystem/auro-drawer` | Slide-in panel; slots: header, content, footer |\n| `<auro-flight>` | `@aurodesignsystem/auro-flight` | Flight segment display (origin, destination, stops) |\n| `<auro-flightline>` | `@aurodesignsystem/auro-flightline` | Visual flight path/stop indicator |\n| `<auro-input>` | `@aurodesignsystem/auro-formkit` | Text input field |\n| `<auro-select>` | `@aurodesignsystem/auro-formkit` | Select/dropdown |\n| `<auro-datepicker>` | `@aurodesignsystem/auro-formkit` | Date picker input |\n| `<auro-combobox>` | `@aurodesignsystem/auro-formkit` | Combobox with search |\n| `<auro-checkbox>` | `@aurodesignsystem/auro-formkit` | Checkbox input |\n| `<auro-radio>` | `@aurodesignsystem/auro-formkit` | Radio button input |\n| `<auro-header>` | `@aurodesignsystem/auro-header` | Page/section heading |\n| `<auro-hyperlink>` | `@aurodesignsystem/auro-hyperlink` | Accessible anchor link |\n| `<auro-icon>` | `@aurodesignsystem/auro-icon` | Alaska Airlines icon: `category` + `name` attributes |\n| `<auro-loader>` | `@aurodesignsystem/auro-loader` | Loading spinner |\n| `<auro-lockup>` | `@aurodesignsystem/auro-lockup` | Image + text layout lockup |\n| `<auro-nav>` | `@aurodesignsystem/auro-nav` | Secondary navigation aid (relation to higher-level pages) |\n| `<auro-pane>` | `@aurodesignsystem/auro-pane` | Selectable shoulder dates with associated prices |\n| `<auro-popover>` | `@aurodesignsystem/auro-popover` | Tooltip-style popover |\n| `<auro-sidenav>` | `@aurodesignsystem/auro-sidenav` | Vertical side navigation |\n| `<auro-skeleton>` | `@aurodesignsystem/auro-skeleton` | Loading placeholder skeleton |\n| `<auro-slideshow>` | `@aurodesignsystem/auro-slideshow` | Image/content slideshow |\n| `<auro-table>` | `@aurodesignsystem/auro-table` | Accessible data table |\n| `<auro-tabs>` | `@aurodesignsystem/auro-tabs` | Tabbed content panels |\n| `<auro-tail>` | `@aurodesignsystem/auro-tail` | Alaska, Hawaiian, and partner airline tail graphics |\n| `<auro-toast>` | `@aurodesignsystem/auro-toast` | Transient notification toast |\n| `<auro-tokenlist>` | `@aurodesignsystem/auro-tokenlist` | Design token display utilities |\n\n## Common Patterns\n\n### Button (default, secondary, tertiary)\n```html\n<auro-button>Primary</auro-button>\n<auro-button variant="secondary">Secondary</auro-button>\n<auro-button variant="tertiary">Tertiary</auro-button>\n<auro-button loading>Saving...</auro-button>\n```\n\n### Alert\n```html\n<auro-alert type="success">Changes saved.</auro-alert>\n<auro-alert type="error">Something went wrong.</auro-alert>\n<auro-alert type="warning">Please review before continuing.</auro-alert>\n<auro-alert type="information">Your flight departs at 9am.</auro-alert>\n```\n\n### Form inputs (auro-formkit)\nauro-formkit has no root export \u2014 always import the specific sub-component.\nThe field label is a **slot**, not an attribute.\n```js\nimport "@aurodesignsystem/auro-formkit/auro-input";\nimport "@aurodesignsystem/auro-formkit/auro-select";\n```\n```html\n<auro-input required>\n <span slot="label">First name</span>\n</auro-input>\n<auro-select>\n <span slot="label">Seat preference</span>\n <auro-menu>\n <auro-menuoption value="window">Window</auro-menuoption>\n <auro-menuoption value="aisle">Aisle</auro-menuoption>\n </auro-menu>\n</auro-select>\n```\n\n### Icon\nSet `category` and `name`. Icon names are exact \u2014 check the icon library for the correct name.\n```html\n<auro-icon category="interface" name="arrow-right"></auro-icon>\n<auro-icon category="terminal" name="plane-side-fill"></auro-icon>\n```\n\n### Hyperlink\n```html\n<auro-hyperlink href="/flights">View flights</auro-hyperlink>\n<auro-hyperlink href="https://example.com" target="_blank">External link</auro-hyperlink>\n```\n\n### Dialog (modal)\n```js\ndocument.querySelector(\'#confirmDialog\').show();\n```\n```html\n<auro-dialog id="confirmDialog">\n <span slot="header">Confirm booking</span>\n <div slot="content">Are you sure you want to book this flight?</div>\n <div slot="footer">\n <auro-button>Confirm</auro-button>\n <auro-button variant="secondary">Cancel</auro-button>\n </div>\n</auro-dialog>\n```\n\n## Accessibility Notes\n- Use the `ariaLabel` slot on `<auro-button>` for icon-only buttons\n- `<auro-hyperlink>` adds rel="noopener noreferrer" automatically for external links\n- All `auro-formkit` components handle aria-invalid and error messaging built-in\n- All components meet WCAG 2.1 AA\n\n## Documentation\n- Component docs: https://auro.alaskaair.com\n- Component status: https://auro.alaskaair.com/component-status\n- Design tokens: https://auro.alaskaair.com/getting-started/developers/token-usage\n- Contributing: https://auro.alaskaair.com/getting-started/developers/contributing\n- GitHub: https://github.com/AlaskaAirlines\n';var Ja=Zo.command("context").description("Generate an AI assistant context document for the Auro Design System").option("-o, --output <path>","Write context to a file instead of stdout (e.g. AURO_CONTEXT.md)").action(async r=>{if(r.output){let t=Qo(`Writing context to ${r.output}...`).start();try{let e=Xo.resolve(process.cwd(),r.output);await Yo.writeFile(e,Ve,"utf-8"),t.succeed(`Auro context written to ${r.output}`),console.log(`
|
|
67
67
|
Paste this file into your AI coding tool (Claude, Cursor, Copilot, etc.) to prime it on Auro components.`)}catch(e){let o=e instanceof Error?e.message:String(e);t.fail(`Failed to write context: ${o}`),process.exit(1)}}else process.stdout.write(Ve)});import{program as en}from"commander";var Je=en.command("docs").description("Generate API documentation").option("-c, --cem","Generate Custom Elements Manifest (CEM) file",!1).option("-a, --api","Creates api md file from CEM",!1).option("-w, --watch","Watch for changes and rebuild docs",!1).option("-r, --readme-template <url>","URL to the README template file").option("--skip-readme","Skip README.md processing",!1);Je=Z(Je);var Qa=Je.action(async r=>{r.cem&&await ne(),r.api&&await se(),await lt(r),r.serve&&await ut(r),r.watch&&await mt(r)});import{program as sn}from"commander";import{Octokit as Ke}from"@octokit/rest";import*as ye from"azure-devops-node-api";import he from"ora";var tn=async r=>{let t=process.env.GH_TOKEN;if(!t)throw new Error("GH_TOKEN environment variable is required");let e=new Ke({auth:t}),o,n,s;if(r.includes("github.com")){let a=r.match(/github\.com\/([^\/]+)\/([^\/]+)\/issues\/(\d+)/);if(!a)throw new Error("Invalid GitHub issue URL format");[,o,n,s]=a}else if(r.includes("#")){let a=r.match(/([^\/]+)\/([^#]+)#(\d+)/);if(!a)throw new Error("Invalid GitHub issue reference format");[,o,n,s]=a}else throw new Error("Issue must be provided as full URL or in format 'owner/repo#number'");let i=Number.parseInt(s,10);try{let{data:a}=await e.rest.issues.get({owner:o,repo:n,issue_number:i});return{title:a.title,body:a.body??null,html_url:a.html_url,number:a.number,repository:{owner:{login:o},name:n}}}catch(a){throw new Error(`Failed to fetch GitHub issue: ${a}`)}},rn=async r=>{let t=process.env.GH_TOKEN;if(!t)return null;let e=new Ke({auth:t});try{let o=`
|
|
68
68
|
query($owner: String!, $repo: String!, $issueNumber: Int!) {
|
|
69
69
|
repository(owner: $owner, name: $repo) {
|