@fugood/bricks-cli 2.26.0-beta.14 → 2.26.0-beta.16
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/lib/1010.js +1 -1
- package/lib/1215.js +1 -1
- package/lib/1708.js +2 -2
- package/lib/1975.js +1 -0
- package/lib/2486.js +1 -1
- package/lib/2557.js +1 -1
- package/lib/4456.js +1 -1
- package/lib/4530.js +10 -10
- package/lib/6194.js +1 -1
- package/lib/6632.js +7 -0
- package/lib/6818.js +1 -1
- package/lib/7294.js +1 -1
- package/lib/907.js +15 -13
- package/lib/9320.js +1 -1
- package/lib/9387.js +5 -5
- package/lib/9439.js +274 -226
- package/lib/9663.js +1 -1
- package/lib/index.js +41 -39
- package/lib/lib.js +4 -2
- package/package.json +5 -5
- package/lib/6042.js +0 -1
- package/lib/9590.js +0 -7
package/lib/9387.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const __rspack_esm_id=9387;export const __rspack_esm_ids=[9387];export const __webpack_modules__={75149(t,
|
|
1
|
+
export const __rspack_esm_id=9387;export const __rspack_esm_ids=[9387];export const __webpack_modules__={75149(r,t,e){e.d(t,{P:()=>p});var a=e(79657),o=e(64007);function p(r){var t=process.env.HTTPS_PROXY||process.env.https_proxy;if(!t||!r.startsWith("https://"))return a.Ay;var e=new o(t);return(r,t={})=>(0,a.Ay)(r,{...t,agent:e})}},30182(r,t,e){e.r(t),e.d(t,{BANK_PROPERTY_META_VALUES:()=>p.YC,createBankClient:()=>f,resolveBankEndpoint:()=>n,validateBankPropertyMeta:()=>p.jR});var a=e(99436),o=e(75149),p=e(31596),i={"https://display.bricks.tools":"https://bank.bricks.tools","https://display-beta.bricks.tools":"https://bank-beta.bricks.tools"},n=r=>{if(process.env.BRICKS_BANK_ENDPOINT)return process.env.BRICKS_BANK_ENDPOINT;var t=i[r];if(t)return t;try{var e=new URL(r).hostname;if("localhost"===e||"127.0.0.1"===e)return"http://localhost:8080"}catch{}throw Error(`Cannot derive the Data Bank endpoint from ${r}; set BRICKS_BANK_ENDPOINT to override`)},s=`
|
|
2
2
|
propertyId
|
|
3
3
|
meta
|
|
4
4
|
definition
|
|
@@ -9,7 +9,7 @@ export const __rspack_esm_id=9387;export const __rspack_esm_ids=[9387];export co
|
|
|
9
9
|
lastUpdateKey
|
|
10
10
|
createAt
|
|
11
11
|
updateAt
|
|
12
|
-
`,l={InSubspace:"IN_SUBSPACE",Global:"GLOBAL"},d={IN_SUBSPACE:"InSubspace",GLOBAL:"Global"},
|
|
12
|
+
`,l={InSubspace:"IN_SUBSPACE",Global:"GLOBAL"},d={IN_SUBSPACE:"InSubspace",GLOBAL:"Global"},y=r=>void 0===r?void 0:JSON.stringify(r),u=r=>r&&d[r.meta]?{...r,meta:d[r.meta]}:r,c=(r,t)=>{var e=r[t];if(null!==e&&!Array.isArray(e))throw Error(`Invalid Data Bank API response: expected ${t} to be an array or null`);return(e||[]).map(u)},f=({endpoint:r,spacename:t,spacekey:e})=>{var i,n=`${r}/api/graphql`,d=(0,o.P)(r),u=(i=a(function*(r,a){var o,p=yield d(n,{method:"POST",headers:{"content-type":"application/json",SPACENAME:t,SPACEKEY:e},body:JSON.stringify({query:r,variables:a})}),i=yield p.text();try{o=JSON.parse(i)}catch{if(p.ok)throw Error(`Invalid Data Bank API response (${p.status}): expected JSON`)}if(o?.errors?.length)throw Error(o.errors.map(({message:r})=>r).join("\n"));if(!p.ok){var s=Error(`Data Bank API error (${p.status}): ${i.trim()}`);throw 403===p.status&&(s.isBankAuthError=!0),s}if(!o?.data||"object"!=typeof o.data||Array.isArray(o.data))throw Error("Invalid Data Bank API response: expected a data object");return o.data}),function(r,t){return i.apply(this,arguments)});return{listProperties(){return a(function*({keyword:r,meta:t,ids:e}={}){return(0,p.jR)(t),c((yield u(`#graphql
|
|
13
13
|
query(
|
|
14
14
|
$filterUpdateHashes: [PropertyFilterUpdateHash!]
|
|
15
15
|
$filterMeta: String
|
|
@@ -21,12 +21,12 @@ export const __rspack_esm_id=9387;export const __rspack_esm_ids=[9387];export co
|
|
|
21
21
|
filterKeyword: $filterKeyword
|
|
22
22
|
) { ${s} }
|
|
23
23
|
}
|
|
24
|
-
`,{filterUpdateHashes:e?.map(
|
|
24
|
+
`,{filterUpdateHashes:e?.map(r=>({propertyId:r,value:""})),filterMeta:t,filterKeyword:r})),"properties")}).apply(this,arguments)},getProperty(r){var t=this;return a(function*(){return(yield t.listProperties({ids:[r]})).find(t=>t.propertyId===r)||null})()},updateProperties:(r,t)=>a(function*(){if(!r?.length)throw Error("No properties to update.");var e=r.map(r=>{var t=r.meta||"InSubspace";return(0,p.jR)(t),{propertyId:r.propertyId,meta:l[t],definition:y(r.definition),newDefinitionFallback:y(r.newDefinitionFallback),value:y(r.value),updateNote:r.updateNote||"Updated via bricks-cli",upsert:!1!==r.upsert,tags:r.tags}});return c((yield u(`#graphql
|
|
25
25
|
mutation($properties: [PropertyInput!]!, $dontNotify: Boolean) {
|
|
26
26
|
updateProperty(properties: $properties, dontNotify: $dontNotify) { ${s} }
|
|
27
27
|
}
|
|
28
|
-
`,{properties:e,dontNotify:
|
|
28
|
+
`,{properties:e,dontNotify:t})),"updateProperty")})(),removeProperty:r=>a(function*(){var t=yield u(`#graphql
|
|
29
29
|
mutation($propertyId: String!) {
|
|
30
30
|
removeProperty(propertyId: $propertyId)
|
|
31
31
|
}
|
|
32
|
-
`,{propertyId:
|
|
32
|
+
`,{propertyId:r});if(null!==t.removeProperty&&"boolean"!=typeof t.removeProperty)throw Error("Invalid Data Bank API response: expected removeProperty to be a boolean or null");return t.removeProperty??!1})()}}}};
|