@fugood/bricks-cli 2.25.11 → 2.25.12

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/README.md CHANGED
@@ -170,9 +170,18 @@ bricks device list [-k keyword] [-j|--json]
170
170
  # Resolve a device name or ID
171
171
  bricks device resolve <query> [-l limit] [-j|--json]
172
172
 
173
- # Get device details
173
+ # Get device details (incl. stored Lock, Activity Log and Local Sync settings)
174
174
  bricks device get <device-id> [-j|--json]
175
175
 
176
+ # Update device settings (only the given settings change; other ENV variables are kept)
177
+ bricks device update <device-id> [-n name] [-d description] [--tags a,b] [--dry-run] [-j|--json]
178
+ bricks device update <device-id> [-e KEY=VALUE ...] [--env-json '{"KEY":"value"}'] [--unset-env KEY ...]
179
+ bricks device update <device-id> [--[no-]activity-log] [--activity-log-filter filter] [--[no-]activity-log-screenshot]
180
+ bricks device update <device-id> [--[no-]local-sync] [--local-sync-priority 0-9] [--[no-]local-sync-dynamic-latency] [--local-sync-latency-offset ms]
181
+ bricks device update <device-id> --lock | --unlock
182
+ # --lock / --unlock run alone. A locked device refuses other updates: unlock it first.
183
+ # ENV changes reach the running app after `bricks device refresh <device-id>` (not automatic).
184
+
176
185
  # Bind a new device with passcode
177
186
  bricks device bind <passcode> [-n device-name]
178
187
  bricks device bind <passcode> [--dry-run] [-j|--json]
@@ -206,8 +215,8 @@ bricks app resolve <query> [-l limit] [-j|--json]
206
215
  # Get application details
207
216
  bricks app get <app-id> [-c|--composed] [-j|--json]
208
217
 
209
- # Update application
210
- bricks app update <app-id> [-n name] [-d description] [-c config-json] [-f config-file] [--validate]
218
+ # Update application (`-t ''` clears the tags; a locked application refuses all changes until --unlock)
219
+ bricks app update <app-id> [-n name] [-d description] [-t tags] [--lock|--unlock] [-c config-json] [-f config-file] [--validate]
211
220
 
212
221
  # Short edit application (requires valid shortIds from app config)
213
222
  bricks app short-edit <app-id> -l '[{"shortId":"<subspace-short-id>","path":"property.name","content":"value"}]'
@@ -215,6 +224,12 @@ bricks app short-edit <app-id> -l '[{"shortId":"<subspace-short-id>","path":"pro
215
224
  # Bind/unbind devices
216
225
  bricks app bind <app-id> [-b device-ids] [-u device-ids]
217
226
  bricks app bind <app-id> [-b device-ids] [-u device-ids] [--dry-run] [-j|--json]
227
+ # Set the viewport of new or bound devices (JSON or a JSON file keyed by device ID).
228
+ # Fields: x, y, width, height, rotate, type (rotate|scroll), rotateType (crop|fit|physical-rotate),
229
+ # scrollType (crop|fit), maintainAspectRatio, forceDeviceRatio, mirrorHorizontal, mirrorVertical, content.
230
+ # Fields not given keep the current viewport, else the root layout (full size at 0,0).
231
+ # A bound device keeps its other settings (automation, cron tests, control toggles, env).
232
+ bricks app bind <app-id> --viewport '{"<device-id>":{"x":0,"y":0,"width":960,"height":540,"rotate":90}}' [--dry-run] [-j|--json]
218
233
 
219
234
  # Trigger automation
220
235
  bricks app trigger <app-id> <test-id> [--play|--stop] [--setup-at-launch] [-g match-group]
@@ -225,9 +240,19 @@ bricks app trigger <app-id> <test-id> [--play|--stop] [--setup-at-launch] [-g ma
225
240
  bricks app control-page <app-id> -t <short-edit,canvas-control,device-control,device-control-create-only> [--token-name name] [--expires-in days] [-e KEY=VALUE] [--no-token] [--dry-run] [-j|--json]
226
241
  # The printed URL is <controller>/<page>.html?workspace_secret=…&application_id=…; set BRICKS_CONTROLLER_URL to override the controller origin.
227
242
 
228
- # Preview a release without publishing
243
+ # Create a release (--dry-run checks it without publishing). A semver --version must be newer than every semver release in the cloud (see `bricks app versions <app-id> -j`); non-semver labels such as the default app name work as before.
229
244
  bricks app release <app-id> -c <config-path-or-json> [-n name] [--version version] [--changelogs text] [--dry-run] [-j|--json]
230
245
 
246
+ # CTOR projects: a config-only push (update-app) is the normal last step after edits.
247
+ bricks ctor push --auto-commit -y
248
+ # Release (deploy-app) only when a new version is requested. The version (from --version, --auto-version or package.json) must be semver and newer than every cloud release; a duplicate or lower one is refused before anything changes. There is no bypass flag: restore an old release with `bricks app switch-version`.
249
+ bricks ctor deploy --auto-commit --version <next-version> -y
250
+
251
+ # List release versions, then switch the platform config to one (ID or name).
252
+ # The local CTOR project is not changed. Unreleased changes are dropped: confirm, or pass -y.
253
+ bricks app versions <app-id> [-j|--json]
254
+ bricks app switch-version <app-id> <version-id-or-name> [-y|--yes] [--dry-run] [-j|--json]
255
+
231
256
  # Diagnose a config: schema validation + semantic lint rules
232
257
  # (data-update-race, redundant-rect-overlay, off-grid-frame, out-of-bounds-frame,
233
258
  # wait-async-no-op, missing-result-param, unused-data-node, z-order-cover,
@@ -352,6 +377,9 @@ Notes:
352
377
  - When no `-v/--value-file` is given, `set` keeps the current value (useful to change only tags or the definition).
353
378
  - `-v` parses the input as JSON and falls back to a plain string (`-v '{"a":1}'` → object, `-v hello` → string).
354
379
  - Revoking the auto-provisioned `manager` / `used-by-device` keys rotates them instead of deleting them.
380
+ - Space key values come back masked (last 4 characters) unless the login may read them: the
381
+ workspace owner, a role with `update-workspace`, or a token with the `manage_devtools` scope.
382
+ A key the login creates is always returned in full, and a masked key revokes by its full value.
355
383
  - The Data Bank endpoint is derived from the configured BRICKS endpoint
356
384
  (prod → `bank.bricks.tools`, beta → `bank-beta.bricks.tools`, dev → `localhost:8080`).
357
385
  - Environment overrides for CI / custom setups: `BRICKS_BANK_SPACENAME` + `BRICKS_BANK_SPACEKEY`
package/lib/1178.js CHANGED
@@ -1 +1 @@
1
- export const __rspack_esm_id=1178;export const __rspack_esm_ids=[1178];export const __webpack_modules__={28193(e,o,r){r.a(e,async function(e,t){try{r.r(o),r.d(o,{createCdpClient:()=>u});var n,s=r(99436),a=r(84361),c=e([a]);a=(c.then?(await c)():c)[0];var i=15e3,l=({address:e,port:o,method:r,phase:t="request",closeCode:n,closeReason:s,local:a=!1})=>{var c=s?Buffer.isBuffer(s)?s.toString("utf8"):String(s):"",i="connect"===t?"before the CDP session opened":r?`while waiting for ${r}`:"during the CDP session",l=`${e}:${o}`,d=[];null!=n&&d.push(`code ${n}`),c&&d.push(`reason: ${c}`);var u=[a?`CDP client closed the connection to ${l} ${i}.`:`CDP connection to ${l} closed ${i}.`,d.length>0?`WebSocket close ${d.join(", ")}.`:null,a?null:"The DevTools server currently accepts one CDP client at a time. Another DevTools window or CLI command may have replaced this session. Retry the command, close the other inspector, or avoid running DevTools commands in parallel."].filter(Boolean).join("\n"),h=Error(u);return h.code="CDP_CONNECTION_CLOSED",h.method=r,h.phase=t,h.closeCode=n,h.closeReason=c,h},d=(n=s(function*(e,o,r){var t,n=r?"string"==typeof r?{passcode:r}:r:{},s=n.passcode,a=n.accessToken;if(a)return`ws://${e}:${o}/ws?access_token=${encodeURIComponent(a)}`;if(!s)try{var c=new AbortController;t=setTimeout(()=>c.abort(),3e3);var i=yield fetch(`http://${e}:${o}/json/list`,{signal:c.signal});if(i.ok){var l=yield i.json(),d=l?.[0]?.webSocketDebuggerUrl;if(d){var u=d.match(/\/ws(?:\/.*)?$/);if(u)return`ws://${e}:${o}${u[0]}`}}}catch{}finally{void 0!==t&&clearTimeout(t)}return s?`ws://${e}:${o}/ws/${encodeURIComponent(s)}`:`ws://${e}:${o}/ws`}),function(e,o,r){return n.apply(this,arguments)}),u=(e,o,r)=>{var t,n,c=0,u=new Map,h=new Map,f=null,m=0,p=e=>{for(var o of u.values()){var r=o.reject,t=o.timer,n=o.method;clearTimeout(t),r(e(n))}u.clear()};return{connect:(t=s(function*(){var t=++m,s=yield d(e,o,r);if(t!==m)throw l({address:e,port:o,phase:"connect",local:!0});return new Promise((r,t)=>{n=new a.WebSocket(s,{handshakeTimeout:i});var c=!1;n.once("open",()=>{c=!0,f=null,r()}),n.once("error",r=>{c||t(Error(r.message||`Cannot connect to ${e}:${o}`))}),n.on("message",e=>{try{var o=JSON.parse(e.toString());if(null!=o.id&&u.has(o.id)){var r=u.get(o.id),t=r.resolve,n=r.reject,s=r.timer;clearTimeout(s),u.delete(o.id),o.error?n(Error(o.error.message)):t(o.result);return}if(o.method){var a=h.get(o.method);if(a)for(var c of a)c(o.params)}}catch{}}),n.on("close",(r,n)=>{f={closeCode:r,closeReason:n},c||t(l({address:e,port:o,phase:"connect",closeCode:r,closeReason:n})),p(t=>l({address:e,port:o,method:t,closeCode:r,closeReason:n}))})})}),function(){return t.apply(this,arguments)}),send:(r,t={},s=i)=>new Promise((a,i)=>{if(!n||n.readyState!==n.OPEN)return f?void i(l({address:e,port:o,method:r,closeCode:f.closeCode,closeReason:f.closeReason})):void i(Error(`Not connected to CDP at ${e}:${o} while sending ${r}`));var d=++c,h=setTimeout(()=>{u.delete(d),i(Error(`Timeout: ${r}`))},s);u.set(d,{resolve:a,reject:i,timer:h,method:r}),n.send(JSON.stringify({id:d,method:r,params:t}))}),on:(e,o)=>{h.has(e)||h.set(e,[]),h.get(e).push(o)},off:(e,o)=>{var r=h.get(e);if(r){var t=r.indexOf(o);t>=0&&r.splice(t,1)}},close:()=>{m++,p(r=>l({address:e,port:o,method:r,local:!0})),n&&(n.terminate(),n=null)}}};t()}catch(e){t(e)}})}};
1
+ export const __rspack_esm_id=1178;export const __rspack_esm_ids=[1178];export const __webpack_modules__={28193(e,o,r){r.a(e,async function(e,t){try{r.r(o),r.d(o,{createCdpClient:()=>h});var n,s=r(99436),a=r(84361),c=r(19557),i=e([a]);a=(i.then?(await i)():i)[0];var l=15e3,d=({address:e,port:o,method:r,phase:t="request",closeCode:n,closeReason:s,local:a=!1})=>{var c=s?Buffer.isBuffer(s)?s.toString("utf8"):String(s):"",i="connect"===t?"before the CDP session opened":r?`while waiting for ${r}`:"during the CDP session",l=`${e}:${o}`,d=[];null!=n&&d.push(`code ${n}`),c&&d.push(`reason: ${c}`);var u=[a?`CDP client closed the connection to ${l} ${i}.`:`CDP connection to ${l} closed ${i}.`,d.length>0?`WebSocket close ${d.join(", ")}.`:null,a?null:"The DevTools server currently accepts one CDP client at a time. Another DevTools window or CLI command may have replaced this session. Retry the command, close the other inspector, or avoid running DevTools commands in parallel."].filter(Boolean).join("\n"),h=Error(u);return h.code="CDP_CONNECTION_CLOSED",h.method=r,h.phase=t,h.closeCode=n,h.closeReason=c,h},u=(n=s(function*(e,o,r){var t=r?"string"==typeof r?{passcode:r}:r:{},n=t.passcode,s=t.accessToken;if(s)return`ws://${e}:${o}/ws?access_token=${encodeURIComponent(s)}`;if(!n)try{var a=yield(0,c.uE)(`http://${e}:${o}/json/list`),i=a?.[0]?.webSocketDebuggerUrl;if(i){var l=i.match(/\/ws(?:\/.*)?$/);if(l)return`ws://${e}:${o}${l[0]}`}}catch{}return n?`ws://${e}:${o}/ws/${encodeURIComponent(n)}`:`ws://${e}:${o}/ws`}),function(e,o,r){return n.apply(this,arguments)}),h=(e,o,r)=>{var t,n,c=0,i=new Map,h=new Map,p=null,f=0,m=e=>{for(var o of i.values()){var r=o.reject,t=o.timer,n=o.method;clearTimeout(t),r(e(n))}i.clear()};return{connect:(t=s(function*(){var t=++f,s=yield u(e,o,r);if(t!==f)throw d({address:e,port:o,phase:"connect",local:!0});return new Promise((r,t)=>{n=new a.WebSocket(s,{handshakeTimeout:l});var c=!1;n.once("open",()=>{c=!0,p=null,r()}),n.once("error",r=>{c||t(Error(r.message||`Cannot connect to ${e}:${o}`))}),n.on("message",e=>{try{var o=JSON.parse(e.toString());if(null!=o.id&&i.has(o.id)){var r=i.get(o.id),t=r.resolve,n=r.reject,s=r.timer;clearTimeout(s),i.delete(o.id),o.error?n(Error(o.error.message)):t(o.result);return}if(o.method){var a=h.get(o.method);if(a)for(var c of a)c(o.params)}}catch{}}),n.on("close",(r,n)=>{p={closeCode:r,closeReason:n},c||t(d({address:e,port:o,phase:"connect",closeCode:r,closeReason:n})),m(t=>d({address:e,port:o,method:t,closeCode:r,closeReason:n}))})})}),function(){return t.apply(this,arguments)}),send:(r,t={},s=l)=>new Promise((a,l)=>{if(!n||n.readyState!==n.OPEN)return p?void l(d({address:e,port:o,method:r,closeCode:p.closeCode,closeReason:p.closeReason})):void l(Error(`Not connected to CDP at ${e}:${o} while sending ${r}`));var u=++c,h=setTimeout(()=>{i.delete(u),l(Error(`Timeout: ${r}`))},s);i.set(u,{resolve:a,reject:l,timer:h,method:r}),n.send(JSON.stringify({id:u,method:r,params:t}))}),on:(e,o)=>{h.has(e)||h.set(e,[]),h.get(e).push(o)},off:(e,o)=>{var r=h.get(e);if(r){var t=r.indexOf(o);t>=0&&r.splice(t,1)}},close:()=>{f++,m(r=>d({address:e,port:o,method:r,local:!0})),n&&(n.terminate(),n=null)}}};t()}catch(e){t(e)}})}};
package/lib/1215.js CHANGED
@@ -1 +1 @@
1
- export const __rspack_esm_id=1215;export const __rspack_esm_ids=[1215];export const __webpack_modules__={5018(e){e.exports=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},44668(e,t,r){var i=r(56347);function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},70604(e){e.exports=function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},90250(e,t,r){var i=r(3634),n=r(70604),o=r(78243),s=r(5523);e.exports=function(e){return i(e)||n(e)||o(e)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},23878(e,t,r){var i=r(14319).default;e.exports=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},56347(e,t,r){var i=r(14319).default,n=r(23878);e.exports=function(e){var t=n(e,"string");return"symbol"==i(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},14319(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},69995(e,t,r){r.d(t,{H:()=>i});function i(e,t){try{var r=JSON.parse(e).error,i=r?.message??r;if("string"==typeof i&&i)return i}catch{}return e||t}},42208(e,t,r){r.d(t,{RP:()=>a});var i=r(99436),n=r(75720),o="CTOR",s="ctor@bricks.tools",u=`Co-authored-by: ${o} <${s}>`;function l(){return(l=i(function*(e){return!!(yield(0,n.sh)`cd ${e} && git config user.email`.quiet().nothrow().text()).trim()})).apply(this,arguments)}function a(e,t){return c.apply(this,arguments)}function c(){return(c=i(function*(e,t,r=[]){var i=yield function(e){return l.apply(this,arguments)}(e),n=i?[]:["-c",`user.name=${o}`,"-c",`user.email=${s}`],a=[];for(var c of t)a.push("-m",c);return i&&a.push("-m",u),[...n,"commit",...r,...a]})).apply(this,arguments)}},13376(e,t,r){r.d(t,{a:()=>l,p:()=>s});var i=r(99436),n=r(51455),o=".bricks/.last-pushed-commit";function s(e){return u.apply(this,arguments)}function u(){return(u=i(function*(e){try{return(yield(0,n.readFile)(`${e}/${o}`,"utf8")).trim()||null}catch{return null}})).apply(this,arguments)}function l(e,t){return a.apply(this,arguments)}function a(){return(a=i(function*(e,t){t&&(yield(0,n.mkdir)(`${e}/.bricks`,{recursive:!0}),yield(0,n.writeFile)(`${e}/${o}`,t))})).apply(this,arguments)}},69070(e,t,r){r.d(t,{k:()=>s,q:()=>l});var i=r(99436),n=r(26848),o=r(1708);function s(e){return u.apply(this,arguments)}function u(){return(u=i(function*(e){if(!o.stdin.isTTY)return"";var t=(0,n.createInterface)({input:o.stdin,output:o.stdout});try{return(yield t.question(`${e} `)).trim()}finally{t.close()}})).apply(this,arguments)}function l(e){return a.apply(this,arguments)}function a(){return(a=i(function*(e){return(yield s(e))==="y"})).apply(this,arguments)}},75720(e,t,r){r.d(t,{p:()=>p,sh:()=>h});var i,n,o=r(90250),s=r(99436),u=r(5018),l=r(44668),a=r(31421),c=r(73024),p=()=>{var e=process.argv[1];return e&&!(e.includes("$bunfs")||e.includes("~BUN"))&&(0,c.existsSync)(e)?[process.execPath,e]:[process.execPath]},d=l(function e(t){u(this,e),this._cwd=void 0,this._mode="default",this._throw=!0,this._env=void 0,this._promise=null,this.args=t},[{key:"cwd",value:function(e){return this._cwd=e,this}},{key:"quiet",value:function(){return this._mode="quiet",this}},{key:"nothrow",value:function(){return this._throw=!1,this}},{key:"env",value:function(e){return this._env={...this._env,...e},this}},{key:"text",value:(i=s(function*(){return"default"===this._mode&&(this._mode="text"),(yield this.run()).stdout.toString("utf8")}),function(){return i.apply(this,arguments)})},{key:"then",value:function(e,t){return this.run().then(e,t)}},{key:"run",value:function(){return this._promise||(this._promise=this.exec()),this._promise}},{key:"exec",value:(n=s(function*(){var e=o(this.args),t=e[0],r=(function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i})(e).slice(1);if(!t)throw Error("sh: empty command");var i="default"===this._mode?["inherit","pipe","pipe"]:"quiet"===this._mode?["ignore","pipe","pipe"]:["inherit","pipe","pipe"],n=this._env?{...process.env,...this._env}:void 0,s=(0,a.spawn)(t,r,{cwd:this._cwd,stdio:i,env:n}),u=[],l=[];s.stdout?.on("data",e=>{u.push(e),"default"===this._mode&&process.stdout.write(e)}),s.stderr?.on("data",e=>{l.push(e),"default"===this._mode&&process.stderr.write(e)});var c=yield new Promise((e,t)=>{s.on("error",t),s.on("close",(t,r)=>e({code:t,signal:r}))}),p=c.code,d=c.signal,f=p??1,h=Buffer.concat(u),y=Buffer.concat(l);if(0!==f&&this._throw){var v=d?`signal ${d}`:`exit ${f}`,m=Error(`sh: command failed with ${v}: ${this.args.join(" ")}`);throw m.exitCode=f,m.stdout=h,m.stderr=y,m}return{exitCode:f,stdout:h,stderr:y}}),function(){return n.apply(this,arguments)})}]),f=/\s/;function h(e,...t){var r,i,n,o,s,u=(r=[],i="",n=!1,o=()=>{n&&(r.push(i),i="",n=!1)},s=e=>{i+=e,n=!0},(e.forEach((e,r)=>{for(var i=0;i<e.length;i++){var n=e[i];f.test(n)?o():s(n)}r<t.length&&(e=>{if(null!=e){if(Array.isArray(e))return e.forEach((e,t)=>{t>0&&o(),s(String(e))});s(String(e))}})(t[r])}),o(),r.length>=3&&"cd"===r[0]&&"&&"===r[2])?{tokens:r.slice(3),initialCwd:r[1]}:{tokens:r}),l=u.tokens,a=u.initialCwd,c=new d(l);return a&&c.cwd(a),c}},42914(e,t,r){r.r(t),r.d(t,{bumpPatchVersion:()=>y,deploy:()=>v});var i,n,o=r(68832),s=r(99436),u=r(51455),l=r(75720),a=r(69995),c=r(42208),p=r(13376),d=r(69070),f=(i=s(function*(e){try{return yield(0,u.access)(e),!0}catch{return!1}}),function(e){return i.apply(this,arguments)}),h=(n=s(function*(e){return JSON.parse((yield(0,u.readFile)(e,"utf8")))}),function(e){return n.apply(this,arguments)}),y=e=>{var t=/^(v?)(\d+)\.(\d+)(?:\.(\d+))?(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$/.exec(e);if(!t)return null;var r=o(t,6),i=r[1],n=r[2],s=r[3],u=r[4],l=void 0===u?"0":u;return r[5]?`${i}${n}.${s}.${l}`:`${i}${n}.${s}.${Number(l)+1}`};function v(){return m.apply(this,arguments)}function m(){return(m=s(function*(e={}){process.env.BRICKS_RELEASE_SIGN||(process.env.BRICKS_RELEASE_SIGN="CTOR");var t,r=process.cwd(),i=e.changelogs,n=e.changelogsFile,o=e.autoCommit,s=e.autoVersion,v=e.version,m=e.yes,_=0===(yield(0,l.sh)`cd ${r} && git status`.quiet().nothrow()).exitCode;if(!_&&!m&&!(yield(0,d.q)("No git repository found, continue? (y/n)")))throw Error("Deployment cancelled");var g=yield h(`${r}/application.json`),x=yield h(`${r}/.bricks/build/application-config.json`),w=`${r}/package.json`,$=yield f(w);if(v){if(t=v,$){var b=yield h(w);b.version=t,yield(0,u.writeFile)(w,JSON.stringify(b,null,2)+"\n")}}else if(s&&$){var S=yield h(w);if(!(t=y(S.version||"0.0.0")))throw Error(`Cannot auto-bump non-semver version "${S.version}" — pass an explicit version instead`);S.version=t,yield(0,u.writeFile)(w,JSON.stringify(S,null,2)+"\n")}else t=$?(yield h(w)).version:void 0;var k="";if(i)k=i;else if(n){if(!(yield f(n)))throw Error(`Changelogs file not found: ${n}`);k=yield(0,u.readFile)(n,"utf8")}else m||(k=(yield(0,d.k)("Enter changelogs (optional, press Enter to skip):"))||"");var E="";if(_){if(yield(0,l.sh)`cd ${r} && git diff --name-only --diff-filter=ACMR`.text())if(o){var C=`chore: release ${t||"new version"}`,A=k||"[no changelogs]";yield(0,l.sh)`cd ${r} && git add -A`;var N=yield(0,c.RP)(r,[C,A]);yield(0,l.sh)`cd ${r} && git ${N}`}else throw Error("Unstaged changes found, please commit or stash your changes before deploying");E=(yield(0,l.sh)`cd ${r} && git rev-parse HEAD`.text()).trim()}if(!m&&!(yield(0,d.q)("Are you sure you want to deploy? (y/n)")))throw Error("Deployment cancelled");var j="module"===g.type,q={...x,title:t||x.title,bricks_project_last_commit_id:E||void 0},M=`${r}/.bricks/build/release-config.json`;yield(0,u.writeFile)(M,JSON.stringify(q));var O=["bricks",j?"module":"app","release",g.id,"-c",M,"--json"];g.name&&O.push("--name",g.name),t&&O.push("--version",t),k&&O.push("--changelogs",k);var P=yield(0,l.sh)`${O}`.quiet().nothrow();if(0!==P.exitCode){var R=P.stderr.toString()||P.stdout.toString();throw Error((0,a.H)(R,"Release failed"))}var F=JSON.parse(P.stdout.toString());E&&(yield(0,p.a)(r,E)),console.log(`${j?"Module":"App"} deployed: ${F.target?.name||g.name}`)})).apply(this,arguments)}}};
1
+ export const __rspack_esm_id=1215;export const __rspack_esm_ids=[1215];export const __webpack_modules__={5018(e){e.exports=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},44668(e,t,r){var i=r(56347);function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},70604(e){e.exports=function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},90250(e,t,r){var i=r(3634),n=r(70604),o=r(78243),s=r(5523);e.exports=function(e){return i(e)||n(e)||o(e)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},23878(e,t,r){var i=r(14319).default;e.exports=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},56347(e,t,r){var i=r(14319).default,n=r(23878);e.exports=function(e){var t=n(e,"string");return"symbol"==i(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},14319(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},69995(e,t,r){r.d(t,{H:()=>i});function i(e,t){try{var r=JSON.parse(e).error,i=r?.message??r;if("string"==typeof i&&i)return i}catch{}return e||t}},42208(e,t,r){r.d(t,{RP:()=>a});var i=r(99436),n=r(75720),o="CTOR",s="ctor@bricks.tools",u=`Co-authored-by: ${o} <${s}>`;function l(){return(l=i(function*(e){return!!(yield(0,n.sh)`cd ${e} && git config user.email`.quiet().nothrow().text()).trim()})).apply(this,arguments)}function a(e,t){return c.apply(this,arguments)}function c(){return(c=i(function*(e,t,r=[]){var i=yield function(e){return l.apply(this,arguments)}(e),n=i?[]:["-c",`user.name=${o}`,"-c",`user.email=${s}`],a=[];for(var c of t)a.push("-m",c);return i&&a.push("-m",u),[...n,"commit",...r,...a]})).apply(this,arguments)}},13376(e,t,r){r.d(t,{$j:()=>p,M7:()=>f,ay:()=>l,pe:()=>s});var i=r(99436),n=r(51455),o=".bricks/.last-pushed-commit";function s(e){return u.apply(this,arguments)}function u(){return(u=i(function*(e){try{return(yield(0,n.readFile)(`${e}/${o}`,"utf8")).trim()||null}catch{return null}})).apply(this,arguments)}function l(e,t){return a.apply(this,arguments)}function a(){return(a=i(function*(e,t){t&&(yield(0,n.mkdir)(`${e}/.bricks`,{recursive:!0}),yield(0,n.writeFile)(`${e}/${o}`,t))})).apply(this,arguments)}var c=".bricks/build/.last-synced-server-commit.json";function p(e){return d.apply(this,arguments)}function d(){return(d=i(function*(e){try{var t=JSON.parse((yield(0,n.readFile)(`${e}/${c}`,"utf8"))),r=t.serverCommitId,i=t.localCommitId;return r&&i?{serverCommitId:r,localCommitId:i}:null}catch{return null}})).apply(this,arguments)}function f(e,t){return h.apply(this,arguments)}function h(){return(h=i(function*(e,{serverCommitId:t,localCommitId:r}){t&&r&&(yield(0,n.mkdir)(`${e}/.bricks/build`,{recursive:!0}),yield(0,n.writeFile)(`${e}/${c}`,JSON.stringify({serverCommitId:t,localCommitId:r})))})).apply(this,arguments)}},69070(e,t,r){r.d(t,{k:()=>s,q:()=>l});var i=r(99436),n=r(26848),o=r(1708);function s(e){return u.apply(this,arguments)}function u(){return(u=i(function*(e){if(!o.stdin.isTTY)return"";var t=(0,n.createInterface)({input:o.stdin,output:o.stdout});try{return(yield t.question(`${e} `)).trim()}finally{t.close()}})).apply(this,arguments)}function l(e){return a.apply(this,arguments)}function a(){return(a=i(function*(e){return(yield s(e))==="y"})).apply(this,arguments)}},75720(e,t,r){r.d(t,{p:()=>p,sh:()=>h});var i,n,o=r(90250),s=r(99436),u=r(5018),l=r(44668),a=r(31421),c=r(73024),p=()=>{var e=process.argv[1];return e&&!(e.includes("$bunfs")||e.includes("~BUN"))&&(0,c.existsSync)(e)?[process.execPath,e]:[process.execPath]},d=l(function e(t){u(this,e),this._cwd=void 0,this._mode="default",this._throw=!0,this._env=void 0,this._promise=null,this.args=t},[{key:"cwd",value:function(e){return this._cwd=e,this}},{key:"quiet",value:function(){return this._mode="quiet",this}},{key:"nothrow",value:function(){return this._throw=!1,this}},{key:"env",value:function(e){return this._env={...this._env,...e},this}},{key:"text",value:(i=s(function*(){return"default"===this._mode&&(this._mode="text"),(yield this.run()).stdout.toString("utf8")}),function(){return i.apply(this,arguments)})},{key:"then",value:function(e,t){return this.run().then(e,t)}},{key:"run",value:function(){return this._promise||(this._promise=this.exec()),this._promise}},{key:"exec",value:(n=s(function*(){var e=o(this.args),t=e[0],r=(function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i})(e).slice(1);if(!t)throw Error("sh: empty command");var i="default"===this._mode?["inherit","pipe","pipe"]:"quiet"===this._mode?["ignore","pipe","pipe"]:["inherit","pipe","pipe"],n=this._env?{...process.env,...this._env}:void 0,s=(0,a.spawn)(t,r,{cwd:this._cwd,stdio:i,env:n}),u=[],l=[];s.stdout?.on("data",e=>{u.push(e),"default"===this._mode&&process.stdout.write(e)}),s.stderr?.on("data",e=>{l.push(e),"default"===this._mode&&process.stderr.write(e)});var c=yield new Promise((e,t)=>{s.on("error",t),s.on("close",(t,r)=>e({code:t,signal:r}))}),p=c.code,d=c.signal,f=p??1,h=Buffer.concat(u),y=Buffer.concat(l);if(0!==f&&this._throw){var m=d?`signal ${d}`:`exit ${f}`,v=Error(`sh: command failed with ${m}: ${this.args.join(" ")}`);throw v.exitCode=f,v.stdout=h,v.stderr=y,v}return{exitCode:f,stdout:h,stderr:y}}),function(){return n.apply(this,arguments)})}]),f=/\s/;function h(e,...t){var r,i,n,o,s,u=(r=[],i="",n=!1,o=()=>{n&&(r.push(i),i="",n=!1)},s=e=>{i+=e,n=!0},(e.forEach((e,r)=>{for(var i=0;i<e.length;i++){var n=e[i];f.test(n)?o():s(n)}r<t.length&&(e=>{if(null!=e){if(Array.isArray(e))return e.forEach((e,t)=>{t>0&&o(),s(String(e))});s(String(e))}})(t[r])}),o(),r.length>=3&&"cd"===r[0]&&"&&"===r[2])?{tokens:r.slice(3),initialCwd:r[1]}:{tokens:r}),l=u.tokens,a=u.initialCwd,c=new d(l);return a&&c.cwd(a),c}},42914(e,t,r){r.r(t),r.d(t,{deploy:()=>m});var i,n,o=r(99436),s=r(51455),u=r(56493),l=r(10536),a=r(75720),c=r(69995),p=r(42208),d=r(13376),f=r(69070),h=(i=o(function*(e){try{return yield(0,s.access)(e),!0}catch{return!1}}),function(e){return i.apply(this,arguments)}),y=(n=o(function*(e){return JSON.parse((yield(0,s.readFile)(e,"utf8")))}),function(e){return n.apply(this,arguments)});function m(){return v.apply(this,arguments)}function v(){return(v=o(function*(e={}){process.env.BRICKS_RELEASE_SIGN||(process.env.BRICKS_RELEASE_SIGN="CTOR");var t,r=process.cwd(),i=e.changelogs,n=e.changelogsFile,o=e.autoCommit,m=e.autoVersion,v=e.version,g=e.yes,_=0===(yield(0,a.sh)`cd ${r} && git status`.quiet().nothrow()).exitCode;if(!_&&!g&&!(yield(0,f.q)("No git repository found, continue? (y/n)")))throw Error("Deployment cancelled");var x=yield y(`${r}/application.json`),w=yield y(`${r}/.bricks/build/application-config.json`),$=`${r}/package.json`,b=yield h($),S=b?yield y($):null;if(v)t=v;else if(m&&b){if(!(t=(0,l.xB)(S.version||"0.0.0")))throw Error(`Cannot auto-bump non-semver version "${S.version}" — pass an explicit version instead`)}else t=S?.version;"module"!==x.type&&(yield(0,l.Ep)((0,u.requireAuth)(),x.id,t));var k=!!S&&!!(v||m)&&S.version!==t;if(_&&!o){var E=yield(0,a.sh)`cd ${r} && git diff --name-only --diff-filter=ACMR`.text();if(E||k)throw Error(E?"Unstaged changes found, please commit or stash your changes before deploying":`Setting the version to ${t} changes package.json; pass --auto-commit to commit it with the release`)}var C="";if(i)C=i;else if(n){if(!(yield h(n)))throw Error(`Changelogs file not found: ${n}`);C=yield(0,s.readFile)(n,"utf8")}else g||(C=(yield(0,f.k)("Enter changelogs (optional, press Enter to skip):"))||"");if(!g&&!(yield(0,f.q)("Are you sure you want to deploy? (y/n)")))throw Error("Deployment cancelled");k&&(S.version=t,yield(0,s.writeFile)($,JSON.stringify(S,null,2)+"\n"));var j="";if(_){if(yield(0,a.sh)`cd ${r} && git diff --name-only --diff-filter=ACMR`.text())if(o){var A=`chore: release ${t||"new version"}`,M=C||"[no changelogs]";yield(0,a.sh)`cd ${r} && git add -A`;var N=yield(0,p.RP)(r,[A,M]);yield(0,a.sh)`cd ${r} && git ${N}`}else throw Error("Unstaged changes found, please commit or stash your changes before deploying");j=(yield(0,a.sh)`cd ${r} && git rev-parse HEAD`.text()).trim()}var q="module"===x.type,O={...w,title:t||w.title,bricks_project_last_commit_id:j||void 0},R=`${r}/.bricks/build/release-config.json`;yield(0,s.writeFile)(R,JSON.stringify(O));var F=[...(0,a.p)(),q?"module":"app","release",x.id,"-c",R,"--json"];x.name&&F.push("--name",x.name),t&&F.push("--version",t),C&&F.push("--changelogs",C);var P=yield(0,a.sh)`${F}`.quiet().nothrow();if(0!==P.exitCode){var I=P.stderr.toString()||P.stdout.toString();throw Error((0,c.H)(I,"Release failed"))}var J=JSON.parse(P.stdout.toString());j&&(yield(0,d.ay)(r,j)),console.log(`${q?"Module":"App"} deployed: ${J.target?.name||x.name}`)})).apply(this,arguments)}}};
package/lib/1374.js ADDED
@@ -0,0 +1,4 @@
1
+ export const __rspack_esm_id=1374;export const __rspack_esm_ids=[1374];export const __webpack_modules__={44187(e){e.exports=function(e,r,t,o){var n=-1,u=null==e?0:e.length;for(o&&u&&(t=e[++n]);++n<u;)t=r(t,e[n],n,e);return t}},52837(e){e.exports=function(e){return e.split("")}},39546(e){var r=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(r)||[]}},51035(e){e.exports=function(e){return function(r){return null==e?void 0:e[r]}}},28931(e,r,t){var o=t(73501);e.exports=function(e,r,t){var n=e.length;return t=void 0===t?n:t,!r&&t>=n?e:o(e,r,t)}},4326(e,r,t){var o=t(28931),n=t(83417),u=t(82237),i=t(95243);e.exports=function(e){return function(r){var t=n(r=i(r))?u(r):void 0,f=t?t[0]:r.charAt(0),s=t?o(t,1).join(""):r.slice(1);return f[e]()+s}}},93640(e,r,t){var o=t(44187),n=t(45881),u=t(39850),i=RegExp("['’]","g");e.exports=function(e){return function(r){return o(u(n(r).replace(i,"")),e,"")}}},69968(e,r,t){e.exports=t(51035)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"})},83417(e){var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return r.test(e)}},15813(e){var r=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return r.test(e)}},82237(e,r,t){var o=t(52837),n=t(83417),u=t(92013);e.exports=function(e){return n(e)?u(e):o(e)}},92013(e){var r="\\ud800-\\udfff",t="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",n="[^"+r+"]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",i="[\\ud800-\\udbff][\\udc00-\\udfff]",f="(?:"+t+"|"+o+")?",s="[\\ufe0e\\ufe0f]?",a="(?:\\u200d(?:"+[n,u,i].join("|")+")"+s+f+")*",c=RegExp(o+"(?="+o+")|"+("(?:"+[n+t+"?",t,u,i,"["+r+"]"].join("|"))+")"+(s+f+a),"g");e.exports=function(e){return e.match(c)||[]}},10482(e){var r="\\ud800-\\udfff",t="\\u2700-\\u27bf",o="a-z\\xdf-\\xf6\\xf8-\\xff",n="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",i="['’]",f="["+u+"]",s="["+o+"]",a="[^"+r+u+"\\d+"+t+o+n+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",p="["+n+"]",l="(?:"+s+"|"+a+")",h="(?:"+p+"|"+a+")",g="(?:"+i+"(?:d|ll|m|re|s|t|ve))?",x="(?:"+i+"(?:D|LL|M|RE|S|T|VE))?",m="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",v="[\\ufe0e\\ufe0f]?",y="(?:\\u200d(?:"+["[^"+r+"]",c,d].join("|")+")"+v+m+")*",E="(?:"+["["+t+"]",c,d].join("|")+")"+(v+m+y),A=RegExp([p+"?"+s+"+"+g+"(?="+[f,p,"$"].join("|")+")",h+"+"+x+"(?="+[f,p+l,"$"].join("|")+")",p+"?"+l+"+"+g,p+"+"+x,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",E].join("|"),"g");e.exports=function(e){return e.match(A)||[]}},56005(e,r,t){var o=t(95243),n=t(5485);e.exports=function(e){return n(o(e).toLowerCase())}},45881(e,r,t){var o=t(69968),n=t(95243),u=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=n(e))&&e.replace(u,o).replace(i,"")}},5485(e,r,t){e.exports=t(4326)("toUpperCase")},39850(e,r,t){var o=t(39546),n=t(15813),u=t(95243),i=t(10482);e.exports=function(e,r,t){return(e=u(e),void 0===(r=t?void 0:r))?n(e)?i(e):o(e):e.match(r)||[]}},85(e,r,t){let{checkConfig:o,checkConfigDeprecatedFeatures:n,lintConfig:u,lintRuleCodes:i}=t(38890),f=["schema-error","ref-error","calc-error","expression-error","action-ref-error","items-event-map-error","deprecated-feature"],s={error:0,warning:1,info:2},a=async(e,{type:r="app",only:t=null,ignore:a=null,checkAutomation:c=!1}={})=>{let d=[...f,...i],p=[...t||[],...a||[]].filter(e=>!d.includes(e));if(p.length>0)throw Error(`Unknown rule code(s): ${p.join(", ")}
2
+ Valid codes: ${d.join(", ")}`);let l=e=>(!t||t.includes(e))&&(!a||!a.includes(e)),h=[],g=o(e,{checkCalc:!0,checkExpressions:!0,checkActionRefs:!0,checkItemsEventMaps:!0,checkAutomation:c,maxLinkFindings:1e4}),x=(e,r,t)=>{l(r)&&(e||[]).forEach(e=>h.push({hint:null,...t(e)}))};x(g.schema,"schema-error",e=>({severity:"error",code:"schema-error",path:e.instancePath||e.dataPath||"/",message:e.message,hint:e.params?.pattern?`pattern: ${e.params.pattern}`:null})),x(g.ref,"ref-error",e=>({severity:"error",code:"ref-error",path:e.field,message:e.message})),x(g.calc,"calc-error",e=>({severity:"error",code:"calc-error",path:e.field,message:e.message})),x(g.expression,"expression-error",e=>({severity:"error",code:"expression-error",path:e.field,message:e.message})),x(g.actionRef,"action-ref-error",e=>({severity:"error",code:"action-ref-error",path:e.field,message:e.message})),x(g.itemsEventMap,"items-event-map-error",e=>({severity:"error",code:"items-event-map-error",path:e.field,message:e.message})),l("deprecated-feature")&&n(e).forEach(e=>h.push({severity:"warning",code:"deprecated-feature",path:e.id,message:e.data,hint:null}));let m=!g.valid;if(!m){let o=t?t.filter(e=>i.includes(e)):null,n=a?a.filter(e=>i.includes(e)):null;(!o||o.length>0)&&h.push(...u(e,{configType:r,only:o,ignore:n}))}h.sort((e,r)=>s[e.severity]-s[r.severity]);let v={errors:h.filter(e=>"error"===e.severity).length,warnings:h.filter(e=>"warning"===e.severity).length,infos:h.filter(e=>"info"===e.severity).length};return{ok:0===v.errors,valid:g.valid,lintSkipped:m,summary:v,issues:h}},c=[["error","Errors"],["warning","Warnings"],["info","Info"]];r.L3=f,r.Q$=a,r.Lf=(e,{strict:r=!1}={})=>e.summary.errors>0||r&&e.summary.warnings>0?1:0,r.EA=e=>{let r=[];r.push("\nConfig Doctor Report");let{target:t}=e;if(t){let e="file"===t.source?`${t.type} config: ${t.path}`:`${t.type}: ${t.id}${t.composed?" (composed)":""}`;r.push(e)}if(r.push("─".repeat(60)),0===e.issues.length)return r.push("✓ No issues found"),r.join("\n");c.forEach(([t,o])=>{let n=e.issues.filter(e=>e.severity===t);0!==n.length&&(r.push(`
3
+ ${o} (${n.length})
4
+ `),n.forEach((e,t)=>{r.push(` ${t+1}. [${e.code}] ${e.path||""}`),r.push(` ${e.message}`),e.hint&&r.push(` ↳ ${e.hint}`)}))}),e.lintSkipped&&r.push("\n ⚠ Lint rules skipped — fix schema/reference errors first"),r.push("\n"+"─".repeat(60));let{errors:o,warnings:n,infos:u}=e.summary,i=[];return o>0&&i.push(`✗ ${o} error(s)`),n>0&&i.push(`⚠ ${n} warning(s)`),u>0&&i.push(`ℹ ${u} info`),r.push(i.join(" ")),r.join("\n")}},63322(e,r,t){t.r(r),t.d(r,{BUILTIN_ISSUE_CODES:()=>f.L3,buildConfigDoctorReport:()=>f.Q$,getDoctorExitCode:()=>f.Lf,loadConfigForDoctor:()=>d,parseCodesOption:()=>a,renderConfigDoctorReport:()=>f.EA,runConfigDoctor:()=>p});var o,n,u=t(99436),i=t(79896),f=t(85),s=t(56493),a=e=>"string"==typeof e&&e?e.split(",").map(e=>e.trim()).filter(Boolean):null,c=e=>{if(!e)throw Error("The fetched record has no config");return"string"==typeof e?JSON.parse(e):e},d=(o=u(function*(e,r,{composed:t=!1}={}){if(i.existsSync(r))return{config:JSON.parse(i.readFileSync(r,"utf-8")),target:{type:e,source:"file",path:r}};var o=(0,s.requireAuth)();if("app"===e){var n=yield o.application({id:r,composed:t});if(!n)throw Error(`Application not found: ${r}`);return{config:c(n.config),target:{type:e,source:"remote",id:r,composed:t}}}var u=yield o.module({id:r});if(!u)throw Error(`Module not found: ${r}`);return{config:c(u.config),target:{type:e,source:"remote",id:r}}}),function(e,r){return o.apply(this,arguments)}),p=(n=u(function*(e,r,t){var o=a(t.only),n=a(t.ignore),u=yield d(e,r,{composed:!!t.composed}),i=u.config,s=u.target,c=yield(0,f.Q$)(i,{type:e,only:o,ignore:n,checkAutomation:!!t.validateAutomation});return c.target=s,{report:c,exitCode:(0,f.Lf)(c,{strict:!!t.strict})}}),function(e,r,t){return n.apply(this,arguments)})}};