@abtnode/blocklet-services 1.16.19-beta-beb58af7 → 1.16.19-beta-0c8ccc95

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.
Files changed (31) hide show
  1. package/api/index.js +1 -0
  2. package/api/middlewares/check-running.js +4 -2
  3. package/api/services/auth/index.js +20 -26
  4. package/api/services/auth/session.js +2 -3
  5. package/api/util/attach-shared-utils.js +32 -0
  6. package/build/asset-manifest.json +23 -23
  7. package/build/index.html +1 -1
  8. package/build/service-worker.js +1 -1
  9. package/build/static/js/{1946.383ddc49.chunk.js → 1946.b8762af5.chunk.js} +2 -2
  10. package/build/static/js/{3131.477fef7e.chunk.js → 3131.b2bb8f6c.chunk.js} +2 -2
  11. package/build/static/js/3842.780dc9e9.chunk.js +3 -0
  12. package/build/static/js/{4461.2e764a6b.chunk.js → 4461.e1e5cd09.chunk.js} +2 -2
  13. package/build/static/js/5547.2b981673.chunk.js +3 -0
  14. package/build/static/js/5785.38eedf8e.chunk.js +2 -0
  15. package/build/static/js/8283.20452732.chunk.js +2 -0
  16. package/build/static/js/8944.f4f91564.chunk.js +2 -0
  17. package/build/static/js/8983.020df395.chunk.js +2 -0
  18. package/build/static/js/9900.26718c8f.chunk.js +2 -0
  19. package/build/static/js/main.cca60152.js +3 -0
  20. package/package.json +23 -23
  21. package/build/static/js/3842.9917fe86.chunk.js +0 -3
  22. package/build/static/js/5547.1bea60f5.chunk.js +0 -3
  23. package/build/static/js/5785.5636e84e.chunk.js +0 -2
  24. package/build/static/js/8283.f3a42d0f.chunk.js +0 -2
  25. package/build/static/js/8944.d4773634.chunk.js +0 -2
  26. package/build/static/js/8983.f509aca0.chunk.js +0 -2
  27. package/build/static/js/9900.2dea9cda.chunk.js +0 -2
  28. package/build/static/js/main.41cd395e.js +0 -3
  29. /package/build/static/js/{3842.9917fe86.chunk.js.LICENSE.txt → 3842.780dc9e9.chunk.js.LICENSE.txt} +0 -0
  30. /package/build/static/js/{5547.1bea60f5.chunk.js.LICENSE.txt → 5547.2b981673.chunk.js.LICENSE.txt} +0 -0
  31. /package/build/static/js/{main.41cd395e.js.LICENSE.txt → main.cca60152.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.19-beta-beb58af7",
6
+ "version": "1.16.19-beta-0c8ccc95",
7
7
  "description": "Provide unified services for every blocklet",
8
8
  "main": "api/index.js",
9
9
  "files": [
@@ -33,17 +33,17 @@
33
33
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
34
34
  "license": "Apache-2.0",
35
35
  "dependencies": {
36
- "@abtnode/analytics": "1.16.19-beta-beb58af7",
37
- "@abtnode/auth": "1.16.19-beta-beb58af7",
38
- "@abtnode/client": "1.16.19-beta-beb58af7",
39
- "@abtnode/connect-storage": "1.16.19-beta-beb58af7",
40
- "@abtnode/constant": "1.16.19-beta-beb58af7",
41
- "@abtnode/core": "1.16.19-beta-beb58af7",
42
- "@abtnode/cron": "1.16.19-beta-beb58af7",
43
- "@abtnode/logger": "1.16.19-beta-beb58af7",
44
- "@abtnode/models": "1.16.19-beta-beb58af7",
45
- "@abtnode/router-templates": "1.16.19-beta-beb58af7",
46
- "@abtnode/util": "1.16.19-beta-beb58af7",
36
+ "@abtnode/analytics": "1.16.19-beta-0c8ccc95",
37
+ "@abtnode/auth": "1.16.19-beta-0c8ccc95",
38
+ "@abtnode/client": "1.16.19-beta-0c8ccc95",
39
+ "@abtnode/connect-storage": "1.16.19-beta-0c8ccc95",
40
+ "@abtnode/constant": "1.16.19-beta-0c8ccc95",
41
+ "@abtnode/core": "1.16.19-beta-0c8ccc95",
42
+ "@abtnode/cron": "1.16.19-beta-0c8ccc95",
43
+ "@abtnode/logger": "1.16.19-beta-0c8ccc95",
44
+ "@abtnode/models": "1.16.19-beta-0c8ccc95",
45
+ "@abtnode/router-templates": "1.16.19-beta-0c8ccc95",
46
+ "@abtnode/util": "1.16.19-beta-0c8ccc95",
47
47
  "@arcblock/did": "^1.18.101",
48
48
  "@arcblock/did-auth": "1.18.101",
49
49
  "@arcblock/did-ext": "^1.18.101",
@@ -52,11 +52,11 @@
52
52
  "@arcblock/jwt": "1.18.101",
53
53
  "@arcblock/validator": "^1.18.101",
54
54
  "@arcblock/ws": "1.18.101",
55
- "@blocklet/constant": "1.16.19-beta-beb58af7",
55
+ "@blocklet/constant": "1.16.19-beta-0c8ccc95",
56
56
  "@blocklet/form-builder": "^0.1.11",
57
57
  "@blocklet/form-collector": "^0.1.6",
58
- "@blocklet/meta": "1.16.19-beta-beb58af7",
59
- "@blocklet/sdk": "1.16.19-beta-beb58af7",
58
+ "@blocklet/meta": "1.16.19-beta-0c8ccc95",
59
+ "@blocklet/sdk": "1.16.19-beta-0c8ccc95",
60
60
  "@did-connect/authenticator": "^2.2.1",
61
61
  "@did-connect/relay-adapter-express": "^2.2.1",
62
62
  "@ocap/client": "1.18.101",
@@ -96,13 +96,13 @@
96
96
  },
97
97
  "resolutions": {},
98
98
  "devDependencies": {
99
- "@abtnode/ux": "1.16.19-beta-beb58af7",
100
- "@arcblock/did-connect": "^2.8.17",
101
- "@arcblock/icons": "^2.8.17",
102
- "@arcblock/ux": "^2.8.17",
103
- "@blocklet/launcher-layout": "2.2.43",
104
- "@blocklet/tracker": "1.16.19-beta-beb58af7",
105
- "@blocklet/ui-react": "^2.8.17",
99
+ "@abtnode/ux": "1.16.19-beta-0c8ccc95",
100
+ "@arcblock/did-connect": "^2.8.18",
101
+ "@arcblock/icons": "^2.8.18",
102
+ "@arcblock/ux": "^2.8.18",
103
+ "@blocklet/launcher-layout": "2.2.44",
104
+ "@blocklet/tracker": "1.16.19-beta-0c8ccc95",
105
+ "@blocklet/ui-react": "^2.8.18",
106
106
  "@emotion/react": "^11.10.4",
107
107
  "@emotion/styled": "^11.10.4",
108
108
  "@iconify/iconify": "^2.2.1",
@@ -172,5 +172,5 @@
172
172
  "url": "https://github.com/ArcBlock/blocklet-server/issues",
173
173
  "email": "shijun@arcblock.io"
174
174
  },
175
- "gitHead": "7b56e521b292c57251fc9f35c96dde4957f4c010"
175
+ "gitHead": "ac7746e282b6690a4ff8487c8e43a7055e383b15"
176
176
  }
@@ -1,3 +0,0 @@
1
- /*! For license information please see 3842.9917fe86.chunk.js.LICENSE.txt */
2
- (self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[3842],{39816:function(n,t,e){"use strict";e.d(t,{Z:function(){return s}});var i=e(33028),r=e(33665),o=e(29996),c=e(37574);function s(n){var t=Object.assign({},((0,r.Z)(n),n));return(0,c.jsx)(o.Z,(0,i.Z)({className:"bottom-button",variant:"contained",color:"primary"},t))}},55537:function(n,t,e){"use strict";e.r(t),e.d(t,{default:function(){return M}});var i,r=e(32723),o=e(59740),c=e(34795),s=e(68079),a=e(33028),u=e(96234),l=e(30969),d=e(19611),f=e.n(d),p=e(49735),v=e.n(p),m=e(12700),h=e.n(m),x=e(43260),b=e.n(x),g=e(75255),k=e(26022),Z=e(8016),y=e(1986),w=e(71171),L=e(16380),C=e(24974),E=e.n(C),O=e(37574);function _(n){var t=n.children,e=n.bottom,i=n.onBottomFix,r=(0,l.useRef)(null),o=(0,l.useRef)(null),c=(0,l.useRef)(null),s=(0,l.useRef)(null),a=(0,l.useState)(!1),d=(0,u.Z)(a,2),f=d[0],p=d[1];return(0,l.useEffect)((function(){var n,t,e=function(){n||(n=setTimeout((function(){o.current&&(o.current.scrollHeight>r.current.clientHeight-c.current.clientHeight?("fix"!==s.current&&(i("fix"),s.current="fix"),p(!0)):("scroll"!==s.current&&(i("scroll"),s.current="scroll"),p(!1))),n=null}),50))};return window.ResizeObserver?t=new ResizeObserver(e):window.addEventListener("resize",e),t.observe(r.current),t.observe(o.current),function(){t?t.disconnect():window.removeEventListener("resize",e),n&&clearTimeout(n)}}),[i]),(0,O.jsxs)(T,{ref:r,className:"".concat(f?"scroll-mode":""),children:[(0,O.jsx)("div",{className:"compact-context",ref:o,children:t}),(0,O.jsx)("div",{className:"fix-container",ref:c,children:e})]})}var T=L.Z.div(i||(i=(0,w.Z)(["\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n animation: fadein ease 0.5s;\n\n .fix-container {\n margin-top: auto;\n width: 100%;\n }\n\n &.scroll-mode {\n .compact-context {\n flex: 1;\n overflow-y: auto;\n }\n .fix-container {\n margin-top: auto;\n flex-shrink: 0;\n }\n }\n\n @keyframes fadein {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n"])));_.propTypes={children:E().any,bottom:E().element.isRequired,onBottomFix:E().func},_.defaultProps={children:[],onBottomFix:function(){}};var P=_,N=e(99398),B=e(7017),j=e(59505),A=e(20244),S=e(74197),R=e(23938),K=e(66744),I=e(32668),F=e(39816),z=["childDid"],G=["value"];function M(n){var t,e=n.onNext,i=n.onPrevious,d=(0,g.Z)((function(n){return n.breakpoints.down("md")})),p=(0,k.PE)().t,m=(0,l.useState)(!1),x=(0,u.Z)(m,2),w=x[0],L=x[1],C=(0,l.useState)(null),E=(0,u.Z)(C,2),_=E[0],T=E[1],M=(0,R.y0)(),U=M.did,q=M.blocklet,D=M.actions,H=(0,S.h6)(),Y=H.prefix,Q=H.getSessionInHeader,V=(q.configs||[]).filter((function(n){return!j.BLOCKLET_CONFIGURABLE_KEY[n.key]})),W=q.environments.find((function(n){return"BLOCKLET_PASSPORT_COLOR"===n.key})),X=f()(A.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo?v=".concat(null===q||void 0===q?void 0:q.updatedAt)),J=[{key:j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE,description:p("blocklet.config.logoSquare"),value:null===(t=q.environments.find((function(n){return"BLOCKLET_APP_LOGO_SQUARE"===n.key})))||void 0===t?void 0:t.value,componentType:"uploader",solo:!0,componentProps:{url:X,height:120,width:120,type:"square",did:U,prefix:Y,headers:Q,onUploaded:D.refreshBlocklet}},{key:j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,description:p("blocklet.config.name"),value:q.environments.find((function(n){return"BLOCKLET_APP_NAME"===n.key})).value},{key:j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,description:p("blocklet.config.description"),value:q.environments.find((function(n){return"BLOCKLET_APP_DESCRIPTION"===n.key})).value},{key:j.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR,description:p("blocklet.config.passportColor"),value:W?W.value:"auto",hidden:!0,componentType:"passport",componentProps:{blocklet:q}}],$=[];(0,B.forEachChildSync)(q,(function(n,t){var e=t.ancestors.slice(1).map((function(n){return n.meta.did}));$.push((n.configs||[]).map((function(t){return(0,a.Z)((0,a.Z)({},t),{},{childDid:e.concat(n.meta.did)})})))})),q.meta.group===j.BlockletGroup.gateway&&(V=V.filter((function(n){return!n.secure&&n.shared})));var nn=h()(b()([].concat((0,s.Z)(V),$)),"key").filter((function(n){return!!n.key})).sort((function(n,t){return n.required&&!t.required?-1:t.required&&!n.required?1:0})),tn=(0,B.getAppMissingConfigs)(q).length,en=function(){var n=(0,c.Z)((0,r.Z)().mark((function n(t){var e,i,c;return(0,r.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=_.childDid,i=(0,o.Z)(_,z),c=[(0,a.Z)((0,a.Z)({},v()(i,["key","value","description"])),{},{value:t})],n.prev=2,L(!0),n.next=6,D.configBlocklet({configs:c,childDid:e});case 6:n.next=11;break;case 8:n.prev=8,n.t0=n.catch(2),y.Z.error(n.t0.message);case 11:return n.prev=11,L(!1),n.finish(11);case 14:case"end":return n.stop()}}),n,null,[[2,8,11,14]])})));return function(t){return n.apply(this,arguments)}}(),rn={},on=[].concat(J,(0,s.Z)(nn)).map((function(n){var t=n.value,e=(0,o.Z)(n,G);return rn[n.key]=t,(0,a.Z)({},e)}));return(0,O.jsxs)(K.Z,{children:[(0,O.jsx)("div",{className:"header",style:{marginBottom:16},children:(0,O.jsx)(N.Z,{title:p("setup.config.title"),subTitle:p("setup.config.subTitle"),onClickBack:function(){i()}})}),(0,O.jsx)("div",{className:"container-main",children:(0,O.jsx)("div",{className:"container-inner",children:(0,O.jsx)(P,{bottom:(0,O.jsx)(I.Z,{mt:8,disabled:w||_,blocklet:q,onStartNow:function(){return e("complete")},children:(0,O.jsx)(F.Z,{variant:"contained",disabled:w||tn||_,onClick:function(){D.refreshFuel({showError:!1}),e()},children:p("setup.next")})}),children:(0,O.jsx)(Z.Z,{style:{margin:"0 auto 20px",paddingTop:d?0:38},loading:w,schema:on,defaultValue:rn,onChange:function(n,t){var e=t.action,i=t.currentItem;"edit"===e?T(i):["cancel","confirm"].includes(e)&&T(null),"confirm"===e&&en(n[i.key])}})})})})]})}M.defaultProps={onNext:function(){},onPrevious:function(){}}},66744:function(n,t,e){"use strict";var i,r=e(71171),o=e(16380),c=e(44876),s=(0,o.Z)(c.Z)(i||(i=(0,r.Z)(["\n display: flex;\n flex-direction: column;\n padding-bottom: 16px;\n "," {\n padding-top: 34px;\n padding-bottom: 34px;\n }\n .header {\n width: 100%;\n margin-bottom: 34px;\n "," {\n margin-bottom: 64px;\n }\n }\n .container-main {\n position: relative;\n flex: 1;\n width: 100%;\n }\n .container-inner {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n overflow-y: auto;\n }\n"])),(function(n){return n.theme.breakpoints.up("md")}),(function(n){return n.theme.breakpoints.up("md")}));t.Z=s},32668:function(n,t,e){"use strict";e.d(t,{Z:function(){return p}});var i,r=e(71171),o=e(33028),c=e(16380),s=e(29996),a=e(26022),u=e(38361),l=e(23539),d=e(38507),f=e(37574);function p(n){var t=n.blocklet,e=n.onStartNow,i=n.children,r=n.disabled,c=n.startNowText,p=n.startNowProps,m=(0,a.PE)().t,h=(0,l.Z)();return!t||(0,d.bg)(t.meta)?(0,f.jsx)(v,{isMobile:h,children:i}):(0,f.jsxs)(v,{isMobile:h,children:[(0,f.jsx)(s.Z,(0,o.Z)((0,o.Z)({className:"start-now",variant:"outlined",disabled:r,onClick:function(){return e()}},p),{},{children:null!==c&&void 0!==c?c:m("setup.startNow")})),(0,f.jsx)(u.Z,{display:"flex",variant:"contained",color:"primary",alignItems:"center",marginLeft:"32px",children:i})]})}p.defaultProps={blocklet:null,onStartNow:function(){},children:null,disabled:!1,startNowText:void 0,startNowProps:{}};var v=(0,c.Z)(u.Z)(i||(i=(0,r.Z)(["\n padding-top: 24px;\n margin-top: auto;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n .start-now {\n min-width: 140px;\n }\n .bottom-button {\n min-width: 120px;\n }\n "," {\n width: 100%;\n }\n\n "," {\n .start-now {\n min-width: inherit;\n }\n .bottom-button {\n min-width: 100px;\n }\n }\n\n "," {\n justify-content: space-between;\n gap: '32px',\n }}\n"])),(function(n){return n.theme.breakpoints.down("lg")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.isMobile}))},23539:function(n,t,e){"use strict";e.d(t,{Z:function(){return o}});var i=e(94702),r=e(75255);function o(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{key:"sm"}).key,t=(0,i.Z)();return(0,r.Z)(t.breakpoints.down(n))}},99398:function(n,t,e){"use strict";var i,r=e(71171),o=e(33028),c=e(59740),s=e(16380),a=e(24974),u=e.n(a),l=e(15405),d=e(37574),f=["title","subTitle","onClickBack"];function p(n){var t=n.title,e=n.subTitle,i=n.onClickBack,r=(0,c.Z)(n,f);return(0,d.jsxs)(v,(0,o.Z)((0,o.Z)({},r),{},{children:[i&&(0,d.jsx)(l.Z,{className:"back-btn",onClick:i}),(0,d.jsx)("div",{className:"title",children:t}),(0,d.jsx)("div",{className:"sub-title",children:e})]}))}var v=s.Z.div(i||(i=(0,r.Z)(["\n position: relative;\n width: 100%;\n text-align: center;\n\n .title {\n font-size: 24px;\n font-weight: 700;\n color: ",";\n\n "," {\n font-size: 20px;\n }\n }\n\n .sub-title {\n font-size: 14px;\n color: ",";\n padding: 0 14px;\n font-weight: 400;\n }\n\n .back-btn {\n position: absolute;\n left: 0;\n top: 8px;\n color: #9397a1;\n font-size: 18px;\n cursor: pointer;\n }\n"])),(function(n){return n.theme.palette.common.black}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.palette.grey[600]}));t.Z=p,p.propTypes={title:u().string,subTitle:u().string,onClickBack:u().oneOfType([u().func,u().string])},p.defaultProps={title:"",subTitle:"",onClickBack:""}},15405:function(n,t,e){"use strict";var i=e(71600);t.Z=void 0;var r=i(e(48035)),o=e(37574),c=(0,r.default)((0,o.jsx)("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");t.Z=c},27724:function(n,t,e){"use strict";var i=e(71600);t.Z=void 0;var r=i(e(48035)),o=e(37574),c=(0,r.default)((0,o.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}),"Done");t.Z=c},43611:function(n,t,e){"use strict";var i=e(30969).createContext(void 0);t.Z=i},42641:function(n,t,e){"use strict";function i(n){var t=n.props,e=n.states,i=n.muiFormControl;return e.reduce((function(n,e){return n[e]=t[e],i&&"undefined"===typeof t[e]&&(n[e]=i[e]),n}),{})}e.d(t,{Z:function(){return i}})},86171:function(n,t,e){"use strict";e.d(t,{Z:function(){return o}});var i=e(30969),r=e(43611);function o(){return i.useContext(r.Z)}},65667:function(n,t){var e;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var n=[],t=0;t<arguments.length;t++){var e=arguments[t];if(e){var o=typeof e;if("string"===o||"number"===o)n.push(e);else if(Array.isArray(e)){if(e.length){var c=r.apply(null,e);c&&n.push(c)}}else if("object"===o){if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]")){n.push(e.toString());continue}for(var s in e)i.call(e,s)&&e[s]&&n.push(s)}}}return n.join(" ")}n.exports?(r.default=r,n.exports=r):void 0===(e=function(){return r}.apply(t,[]))||(n.exports=e)}()},12700:function(n,t,e){var i=e(48311),r=e(53970);n.exports=function(n,t){return n&&n.length?r(n,i(t,2)):[]}}}]);
3
- //# sourceMappingURL=3842.9917fe86.chunk.js.map