@riebeckite/cli 0.0.24 → 0.0.26
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/cli.js +1 -1
- package/package.json +4 -4
package/dist/cli.js
CHANGED
|
@@ -140,7 +140,7 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
140
140
|
`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=yu(t),r=Pi(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=yu(t),r=Pi(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};ty.Parser=Xf});var sy=re(rs=>{"use strict";var ny=Bf(),P9=Wa(),ns=Xa(),I9=_0(),N9=Ce(),O9=Qf(),ry=Jf();function iy(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new O9.LineCounter||null,prettyErrors:t}}function R9(e,t={}){let{lineCounter:n,prettyErrors:r}=iy(t),i=new ry.Parser(n?.addNewLine),a=new ny.Composer(t),s=Array.from(a.compose(i.parse(e)));if(r&&n)for(let o of s)o.errors.forEach(ns.prettifyError(e,n)),o.warnings.forEach(ns.prettifyError(e,n));return s.length>0?s:Object.assign([],{empty:!0},a.streamInfo())}function ay(e,t={}){let{lineCounter:n,prettyErrors:r}=iy(t),i=new ry.Parser(n?.addNewLine),a=new ny.Composer(t),s=null;for(let o of a.compose(i.parse(e),!0,e.length))if(!s)s=o;else if(s.options.logLevel!=="silent"){s.errors.push(new ns.YAMLParseError(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(ns.prettifyError(e,n)),s.warnings.forEach(ns.prettifyError(e,n))),s}function L9(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);let i=ay(e,n);if(!i)return null;if(i.warnings.forEach(a=>I9.warn(i.options.logLevel,a)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function _9(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){let i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(e===void 0){let{keepUndefined:i}=n??t??{};if(!i)return}return N9.isDocument(e)&&!r?e.toString(n):new P9.Document(e,r,n).toString(n)}rs.parse=L9;rs.parseAllDocuments=R9;rs.parseDocument=ay;rs.stringify=_9});var uy=re(ke=>{"use strict";var M9=Bf(),F9=Wa(),B9=yf(),Zf=Xa(),H9=Oa(),hr=Ce(),U9=lr(),q9=Ve(),z9=fr(),j9=dr(),$9=gu(),V9=Wf(),G9=Qf(),Y9=Jf(),xu=sy(),oy=Da();ke.Composer=M9.Composer;ke.Document=F9.Document;ke.Schema=B9.Schema;ke.YAMLError=Zf.YAMLError;ke.YAMLParseError=Zf.YAMLParseError;ke.YAMLWarning=Zf.YAMLWarning;ke.Alias=H9.Alias;ke.isAlias=hr.isAlias;ke.isCollection=hr.isCollection;ke.isDocument=hr.isDocument;ke.isMap=hr.isMap;ke.isNode=hr.isNode;ke.isPair=hr.isPair;ke.isScalar=hr.isScalar;ke.isSeq=hr.isSeq;ke.Pair=U9.Pair;ke.Scalar=q9.Scalar;ke.YAMLMap=z9.YAMLMap;ke.YAMLSeq=j9.YAMLSeq;ke.CST=$9;ke.Lexer=V9.Lexer;ke.LineCounter=G9.LineCounter;ke.Parser=Y9.Parser;ke.parse=xu.parse;ke.parseAllDocuments=xu.parseAllDocuments;ke.parseDocument=xu.parseDocument;ke.stringify=xu.stringify;ke.visit=oy.visit;ke.visitAsync=oy.visitAsync});var X6=re((jQ,ph)=>{(function(){var e;typeof ph<"u"?e=ph.exports=r:e=(function(){return this||(0,eval)("this")})(),e.format=r,e.vsprintf=n,typeof console<"u"&&typeof console.log=="function"&&(e.printf=t);function t(){console.log(r.apply(null,arguments))}function n(i,a){return r.apply(null,[i].concat(a))}function r(i){for(var a=1,s=[].slice.call(arguments),o=0,u=i.length,l="",c,f=!1,p,m,b=!1,E,y=function(){return s[a++]},w=function(){for(var v="";/\d/.test(i[o]);)v+=i[o++],c=i[o];return v.length>0?parseInt(v):null};o<u;++o)if(c=i[o],f)switch(f=!1,c=="."?(b=!1,c=i[++o]):c=="0"&&i[o+1]=="."?(b=!0,o+=2,c=i[o]):b=!0,E=w(),c){case"b":l+=parseInt(y(),10).toString(2);break;case"c":p=y(),typeof p=="string"||p instanceof String?l+=p:l+=String.fromCharCode(parseInt(p,10));break;case"d":l+=parseInt(y(),10);break;case"f":m=String(parseFloat(y()).toFixed(E||6)),l+=b?m:m.replace(/^0/,"");break;case"j":l+=JSON.stringify(y());break;case"o":l+="0"+parseInt(y(),10).toString(8);break;case"s":l+=y();break;case"x":l+="0x"+parseInt(y(),10).toString(16);break;case"X":l+="0x"+parseInt(y(),10).toString(16).toUpperCase();break;default:l+=c;break}else c==="%"?f=!0:l+=c;return l}})()});var QE=re((Tae,KE)=>{"use strict";var cc=Object.prototype.hasOwnProperty,WE=Object.prototype.toString,zE=Object.defineProperty,jE=Object.getOwnPropertyDescriptor,$E=function(t){return typeof Array.isArray=="function"?Array.isArray(t):WE.call(t)==="[object Array]"},VE=function(t){if(!t||WE.call(t)!=="[object Object]")return!1;var n=cc.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&cc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||cc.call(t,i)},GE=function(t,n){zE&&n.name==="__proto__"?zE(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},YE=function(t,n){if(n==="__proto__")if(cc.call(t,n)){if(jE)return jE(t,n).value}else return;return t[n]};KE.exports=function e(){var t,n,r,i,a,s,o=arguments[0],u=1,l=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},u=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});u<l;++u)if(t=arguments[u],t!=null)for(n in t)r=YE(o,n),i=YE(t,n),o!==i&&(c&&i&&(VE(i)||(a=$E(i)))?(a?(a=!1,s=r&&$E(r)?r:[]):s=r&&VE(r)?r:{},GE(o,{name:n,newValue:e(c,s,i)})):typeof i<"u"&&GE(o,{name:n,newValue:i}));return o}});var I7={};Ca(I7,{NonInteractiveSetupError:()=>da,createSetupPrompts:()=>P1});import{createInterface as A1}from"node:readline/promises";function P1(){return{interactive:P7(),async select(e,t){if(D1(),t.length===0)throw new da("There is nothing to select.");let n=[e];t.forEach((i,a)=>{n.push(` ${a+1}) ${i.label}`)});let r=A1({input:process.stdin,output:process.stdout});try{for(;;){let i=(await r.question(`${n.join(`
|
|
141
141
|
`)}
|
|
142
142
|
Select [1-${t.length}]: `)).trim(),a=Number.parseInt(i,10);if(a>=1&&a<=t.length){let s=t[a-1];if(s!==void 0)return s.value}}}finally{r.close()}},async confirm(e,t){D1();let n=A1({input:process.stdin,output:process.stdout}),r=t?" [Y/n]: ":" [y/N]: ";try{for(;;){let i=(await n.question(e+r)).trim();if(i==="")return t;let a=i.toLowerCase();if(a==="y"||a==="yes")return!0;if(a==="n"||a==="no")return!1}}finally{n.close()}},password(e){return uB(e)}}}async function uB(e){D1();let t=A1({input:process.stdin,output:process.stdout,terminal:!0}),n=t;if(typeof n._writeToOutput!="function")throw t.close(),new da("This terminal cannot hide the token input.","Set CLOUDFLARE_API_TOKEN in the environment instead.");let r=n._writeToOutput.bind(t),i=!1;n._writeToOutput=a=>{i||r(a)},process.stdout.write(e),i=!0;try{return await t.question("")}finally{i=!1,n._writeToOutput=r,process.stdout.write(`
|
|
143
|
-
`),t.close()}}function P7(){return process.stdin.isTTY===!0&&process.stdout.isTTY===!0}function D1(){if(!P7())throw new da("Cannot prompt for input in a non-interactive environment.")}var da,I1=Dx(()=>{da=class extends Error{hint;constructor(t,n){super(t),this.name="NonInteractiveSetupError",this.hint=n??"Run the command in an interactive terminal, or provide the value through the environment."}}});import{isScaffoldPresetName as hH,parseScaffoldUtilities as mH,SCAFFOLD_DEFAULT_PRESET as gH,SCAFFOLD_DEFAULT_UTILITIES as bH,SCAFFOLD_PRESETS as Cx,ScaffoldSiteError as yH,scaffoldDeploymentFromFlags as EH}from"create-riebeckite/scaffold";import LF from"node:fs/promises";import Rc from"node:path";import W1 from"node:fs/promises";import l0 from"node:path";import{build as Mx}from"esbuild";import Ix from"node:fs";import Nx from"node:path";function $1(e){let t=Nx.join(e,"package.json"),n;try{n=Ix.readFileSync(t,"utf8")}catch{return[]}let r;try{r=JSON.parse(n)}catch{return[]}let i=r.dependencies;return!i||typeof i!="object"?[]:Object.keys(i).filter(a=>a==="@riebeckite/core"||a.startsWith("@riebeckite/plugin-")||a.startsWith("@riebeckite/theme-"))}import bo from"node:fs";import bi from"node:path";function Ox(e){let t=bi.join(e,"packages");return bo.existsSync(t)?Y1(t).flatMap(n=>{let r=bi.join(n,"package.json"),i=JSON.parse(bo.readFileSync(r,"utf8"));return typeof i.name!="string"?[]:Rx(i.name,n,i)}):[]}function G1(e){let t=Ox(e);return{name:"workspace-package-resolver",setup(n){n.onResolve({filter:/.*/},r=>{let i=t.find(a=>a.find.test(r.path));return i?{path:i.replacement}:null})}}}function Y1(e){let t=bi.join(e,"package.json");return bo.existsSync(t)?[e]:bo.readdirSync(e,{withFileTypes:!0}).filter(n=>n.isDirectory()).flatMap(n=>Y1(bi.join(e,n.name)))}function Rx(e,t,n){let r=[],i=Lx(n.exports)??n.main;if(i&&r.push({find:new RegExp(`^${V1(e)}$`),replacement:bi.join(t,i)}),!n.exports||typeof n.exports!="object")return r;for(let[a,s]of Object.entries(n.exports)){if(a==="."||!a.startsWith("."))continue;let o=wa(s);o&&r.push({find:new RegExp(`^${V1(e+a.slice(1))}$`),replacement:bi.join(t,o)})}return r}function Lx(e){if(typeof e=="string")return e;if(!e||typeof e!="object")return;let t=e["."];if(t!==void 0)return wa(t);if(!Object.keys(e).some(r=>r.startsWith(".")))return wa(e)}var _x=["source","import","module","browser","default","node","require","types"];function wa(e){if(typeof e=="string")return e;if(!e||typeof e!="object")return;let t=e;for(let n of _x)if(n in t){let r=wa(t[n]);if(r)return r}for(let n of Object.values(t)){let r=wa(n);if(r)return r}}function V1(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}import o0 from"node:path";function u0(e,t){return{...e,buildDirectory:o0.join(t,".riebeckite"),outputDirectory:o0.join(t,"dist"),content:{...e.content,directory:o0.resolve(t,e.content.directory)}}}async function K1(e){let t=e.configFile??"riebeckite.config.ts",n=await W1.mkdtemp(l0.join(e.configRoot,".riebeckite-config-")),r=l0.join(n,"config.mjs");try{return await Mx({stdin:{contents:`
|
|
143
|
+
`),t.close()}}function P7(){return process.stdin.isTTY===!0&&process.stdout.isTTY===!0}function D1(){if(!P7())throw new da("Cannot prompt for input in a non-interactive environment.")}var da,I1=Dx(()=>{da=class extends Error{hint;constructor(t,n){super(t),this.name="NonInteractiveSetupError",this.hint=n??"Run the command in an interactive terminal, or provide the value through the environment."}}});import{isScaffoldPresetName as hH,parseScaffoldUtilities as mH,SCAFFOLD_DEFAULT_PRESET as gH,SCAFFOLD_DEFAULT_UTILITIES as bH,SCAFFOLD_PRESETS as Cx,ScaffoldSiteError as yH,scaffoldDeploymentFromFlags as EH}from"create-riebeckite/scaffold";import LF from"node:fs/promises";import Rc from"node:path";import W1 from"node:fs/promises";import l0 from"node:path";import{build as Mx}from"esbuild";import Ix from"node:fs";import Nx from"node:path";function $1(e){let t=Nx.join(e,"package.json"),n;try{n=Ix.readFileSync(t,"utf8")}catch{return[]}let r;try{r=JSON.parse(n)}catch{return[]}let i=r.dependencies;return!i||typeof i!="object"?[]:Object.keys(i).filter(a=>a==="@riebeckite/core"||a==="@riebeckite/ui"||a.startsWith("@riebeckite/plugin-")||a.startsWith("@riebeckite/theme-"))}import bo from"node:fs";import bi from"node:path";function Ox(e){let t=bi.join(e,"packages");return bo.existsSync(t)?Y1(t).flatMap(n=>{let r=bi.join(n,"package.json"),i=JSON.parse(bo.readFileSync(r,"utf8"));return typeof i.name!="string"?[]:Rx(i.name,n,i)}):[]}function G1(e){let t=Ox(e);return{name:"workspace-package-resolver",setup(n){n.onResolve({filter:/.*/},r=>{let i=t.find(a=>a.find.test(r.path));return i?{path:i.replacement}:null})}}}function Y1(e){let t=bi.join(e,"package.json");return bo.existsSync(t)?[e]:bo.readdirSync(e,{withFileTypes:!0}).filter(n=>n.isDirectory()).flatMap(n=>Y1(bi.join(e,n.name)))}function Rx(e,t,n){let r=[],i=Lx(n.exports)??n.main;if(i&&r.push({find:new RegExp(`^${V1(e)}$`),replacement:bi.join(t,i)}),!n.exports||typeof n.exports!="object")return r;for(let[a,s]of Object.entries(n.exports)){if(a==="."||!a.startsWith("."))continue;let o=wa(s);o&&r.push({find:new RegExp(`^${V1(e+a.slice(1))}$`),replacement:bi.join(t,o)})}return r}function Lx(e){if(typeof e=="string")return e;if(!e||typeof e!="object")return;let t=e["."];if(t!==void 0)return wa(t);if(!Object.keys(e).some(r=>r.startsWith(".")))return wa(e)}var _x=["source","import","module","browser","default","node","require","types"];function wa(e){if(typeof e=="string")return e;if(!e||typeof e!="object")return;let t=e;for(let n of _x)if(n in t){let r=wa(t[n]);if(r)return r}for(let n of Object.values(t)){let r=wa(n);if(r)return r}}function V1(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}import o0 from"node:path";function u0(e,t){return{...e,buildDirectory:o0.join(t,".riebeckite"),outputDirectory:o0.join(t,"dist"),content:{...e.content,directory:o0.resolve(t,e.content.directory)}}}async function K1(e){let t=e.configFile??"riebeckite.config.ts",n=await W1.mkdtemp(l0.join(e.configRoot,".riebeckite-config-")),r=l0.join(n,"config.mjs");try{return await Mx({stdin:{contents:`
|
|
144
144
|
import rawConfig from ${JSON.stringify(l0.resolve(e.configRoot,t))};
|
|
145
145
|
import { resolveConfigModule } from "@riebeckite/core";
|
|
146
146
|
export default resolveConfigModule(rawConfig);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riebeckite/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"esbuild": "^0.28.2",
|
|
18
18
|
"jsonc-parser": "^3.3.1",
|
|
19
19
|
"vite": "^8.0.9",
|
|
20
|
-
"@riebeckite/core": "0.0.
|
|
21
|
-
"@riebeckite/honox": "0.0.
|
|
22
|
-
"create-riebeckite": "0.0.
|
|
20
|
+
"@riebeckite/core": "0.0.26",
|
|
21
|
+
"@riebeckite/honox": "0.0.26",
|
|
22
|
+
"create-riebeckite": "0.0.26"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|