mp-front-cli 2.3.2-next.0 → 2.3.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.
Files changed (29) hide show
  1. package/dist/{AuthEngine-CATazTYM.cjs → AuthEngine-CDNhQfnX.cjs} +1 -1
  2. package/dist/{AuthEngine-CQfKuww8.js → AuthEngine-T4Nti8Ya.js} +227 -238
  3. package/dist/core/services/service-token.d.ts +1 -2
  4. package/dist/core/services/service-token.d.ts.map +1 -1
  5. package/dist/core/utils/api-request/fetch-service-parent-be.d.ts +1 -3
  6. package/dist/core/utils/api-request/fetch-service-parent-be.d.ts.map +1 -1
  7. package/dist/core/utils/custom-encrypter.d.ts +4 -11
  8. package/dist/core/utils/custom-encrypter.d.ts.map +1 -1
  9. package/dist/core/utils/custom-header.d.ts +2 -6
  10. package/dist/core/utils/custom-header.d.ts.map +1 -1
  11. package/dist/mp-front-cli-adapter.cjs +1 -1
  12. package/dist/mp-front-cli-adapter.js +70 -72
  13. package/dist/mp-front-cli-all.cjs +1 -1
  14. package/dist/mp-front-cli-all.js +2 -2
  15. package/dist/mp-front-cli-core.cjs +1 -1
  16. package/dist/mp-front-cli-core.js +2 -2
  17. package/dist/mp-front-cli-encrypter.cjs +1 -1
  18. package/dist/mp-front-cli-encrypter.js +32 -63
  19. package/dist/mp-front-cli-header.cjs +1 -1
  20. package/dist/mp-front-cli-header.js +17 -18
  21. package/dist/mp-front-cli-services.cjs +1 -1
  22. package/dist/mp-front-cli-services.js +1 -1
  23. package/dist/{service-token-DrUMHiYQ.js → service-token-BfQQMCM4.js} +166 -174
  24. package/dist/service-token-CPZee3-I.cjs +3 -0
  25. package/dist/stringify-BbkhfUoJ.js +9 -0
  26. package/dist/{stringify-BN6t_WDt.cjs → stringify-Ixz5_KTs.cjs} +1 -1
  27. package/package.json +7 -8
  28. package/dist/service-token-g-Zt_ctQ.cjs +0 -3
  29. package/dist/stringify-93tp0umt.js +0 -9
@@ -0,0 +1,3 @@
1
+ "use strict";var G=Object.defineProperty;var q=(r,t,e)=>t in r?G(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var m=(r,t,e)=>q(r,typeof t!="symbol"?t+"":t,e);const S=require("rxjs"),J=require("./mp-front-cli-logger.cjs");var O=function(r,t){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},O(r,t)};function x(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");O(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var g=function(){return g=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},g.apply(this,arguments)};function V(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e}function N(r,t,e,n){function i(o){return o instanceof e?o:new e(function(c){c(o)})}return new(e||(e=Promise))(function(o,c){function a(l){try{u(n.next(l))}catch(p){c(p)}}function s(l){try{u(n.throw(l))}catch(p){c(p)}}function u(l){l.done?o(l.value):i(l.value).then(a,s)}u((n=n.apply(r,t||[])).next())})}function C(r,t){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,c=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return c.next=a(0),c.throw=a(1),c.return=a(2),typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function a(u){return function(l){return s([u,l])}}function s(u){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,u[0]&&(e=0)),e;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return e.label++,{value:u[1],done:!1};case 5:e.label++,i=u[1],u=[0];continue;case 7:u=e.ops.pop(),e.trys.pop();continue;default:if(o=e.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){e.label=u[1];break}if(u[0]===6&&e.label<o[1]){e.label=o[1],o=u;break}if(o&&e.label<o[2]){e.label=o[2],e.ops.push(u);break}o[2]&&e.ops.pop(),e.trys.pop();continue}u=t.call(r,e)}catch(l){u=[6,l],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function _(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function P(r,t){var e=typeof Symbol=="function"&&r[Symbol.iterator];if(!e)return r;var n=e.call(r),i,o=[],c;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){c={error:a}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(c)throw c.error}}return o}function I(r,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return r.concat(o||Array.prototype.slice.call(t))}function A(r){return this instanceof A?(this.v=r,this):new A(r)}function W(r,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(r,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",c),i[Symbol.asyncIterator]=function(){return this},i;function c(f){return function(d){return Promise.resolve(d).then(f,p)}}function a(f,d){n[f]&&(i[f]=function(h){return new Promise(function(Y,$){o.push([f,h,Y,$])>1||s(f,h)})},d&&(i[f]=d(i[f])))}function s(f,d){try{u(n[f](d))}catch(h){v(o[0][3],h)}}function u(f){f.value instanceof A?Promise.resolve(f.value.v).then(l,p):v(o[0][2],f)}function l(f){s("next",f)}function p(f){s("throw",f)}function v(f,d){f(d),o.shift(),o.length&&s(o[0][0],o[0][1])}}function Q(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=r[Symbol.asyncIterator],e;return t?t.call(r):(r=typeof _=="function"?_(r):r[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(o){e[o]=r[o]&&function(c){return new Promise(function(a,s){c=r[o](c),i(a,s,c.done,c.value)})}}function i(o,c,a,s){Promise.resolve(s).then(function(u){o({value:u,done:a})},c)}}function y(r){return typeof r=="function"}function X(r){var t=function(n){Error.call(n),n.stack=new Error().stack},e=r(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var T=X(function(r){return function(e){r(this),this.message=e?e.length+` errors occurred during unsubscription:
2
+ `+e.map(function(n,i){return i+1+") "+n.toString()}).join(`
3
+ `):"",this.name="UnsubscriptionError",this.errors=e}});function H(r,t){if(r){var e=r.indexOf(t);0<=e&&r.splice(e,1)}}var U=(function(){function r(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var t,e,n,i,o;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var a=_(c),s=a.next();!s.done;s=a.next()){var u=s.value;u.remove(this)}}catch(h){t={error:h}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else c.remove(this);var l=this.initialTeardown;if(y(l))try{l()}catch(h){o=h instanceof T?h.errors:[h]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var v=_(p),f=v.next();!f.done;f=v.next()){var d=f.value;try{j(d)}catch(h){o=o??[],h instanceof T?o=I(I([],P(o)),P(h.errors)):o.push(h)}}}catch(h){n={error:h}}finally{try{f&&!f.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}}if(o)throw new T(o)}},r.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)j(t);else{if(t instanceof r){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},r.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},r.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},r.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&H(e,t)},r.prototype.remove=function(t){var e=this._finalizers;e&&H(e,t),t instanceof r&&t._removeParent(this)},r.EMPTY=(function(){var t=new r;return t.closed=!0,t})(),r})();U.EMPTY;function K(r){return r instanceof U||r&&"closed"in r&&y(r.remove)&&y(r.add)&&y(r.unsubscribe)}function j(r){y(r)?r():r.unsubscribe()}var Z={Promise:void 0},z={setTimeout:function(r,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return setTimeout.apply(void 0,I([r,t],P(e)))},clearTimeout:function(r){return clearTimeout(r)},delegate:void 0};function D(r){z.setTimeout(function(){throw r})}function k(){}function rr(r){r()}var R=(function(r){x(t,r);function t(e){var n=r.call(this)||this;return n.isStopped=!1,e?(n.destination=e,K(e)&&e.add(n)):n.destination=nr,n}return t.create=function(e,n,i){return new E(e,n,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(U),er=(function(){function r(t){this.partialObserver=t}return r.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(n){w(n)}},r.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(n){w(n)}else w(t)},r.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){w(e)}},r})(),E=(function(r){x(t,r);function t(e,n,i){var o=r.call(this)||this,c;return y(e)||!e?c={next:e??void 0,error:n??void 0,complete:i??void 0}:c=e,o.destination=new er(c),o}return t})(R);function w(r){D(r)}function tr(r){throw r}var nr={closed:!0,next:k,error:tr,complete:k};function or(r,t,e,n,i){return new ir(r,t,e,n,i)}var ir=(function(r){x(t,r);function t(e,n,i,o,c,a){var s=r.call(this,e)||this;return s.onFinalize=c,s.shouldUnsubscribe=a,s._next=n?function(u){try{n(u)}catch(l){e.error(l)}}:r.prototype._next,s._error=o?function(u){try{o(u)}catch(l){e.error(l)}finally{this.unsubscribe()}}:r.prototype._error,s._complete=i?function(){try{i()}catch(u){e.error(u)}finally{this.unsubscribe()}}:r.prototype._complete,s}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;r.prototype.unsubscribe.call(this),!n&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(R),B=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function cr(r){return r}function ur(r){return r.length===0?cr:r.length===1?r[0]:function(e){return r.reduce(function(n,i){return i(n)},e)}}var b=(function(){function r(t){t&&(this._subscribe=t)}return r.prototype.lift=function(t){var e=new r;return e.source=this,e.operator=t,e},r.prototype.subscribe=function(t,e,n){var i=this,o=ar(t)?t:new E(t,e,n);return rr(function(){var c=i,a=c.operator,s=c.source;o.add(a?a.call(o,s):s?i._subscribe(o):i._trySubscribe(o))}),o},r.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},r.prototype.forEach=function(t,e){var n=this;return e=L(e),new e(function(i,o){var c=new E({next:function(a){try{t(a)}catch(s){o(s),c.unsubscribe()}},error:o,complete:i});n.subscribe(c)})},r.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},r.prototype[B]=function(){return this},r.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return ur(t)(this)},r.prototype.toPromise=function(t){var e=this;return t=L(t),new t(function(n,i){var o;e.subscribe(function(c){return o=c},function(c){return i(c)},function(){return n(o)})})},r.create=function(t){return new r(t)},r})();function L(r){var t;return(t=r??Z.Promise)!==null&&t!==void 0?t:Promise}function sr(r){return r&&y(r.next)&&y(r.error)&&y(r.complete)}function ar(r){return r&&r instanceof R||sr(r)&&K(r)}var fr=(function(r){return r&&typeof r.length=="number"&&typeof r!="function"});function lr(r){return y(r==null?void 0:r.then)}function hr(r){return y(r[B])}function yr(r){return Symbol.asyncIterator&&y(r==null?void 0:r[Symbol.asyncIterator])}function pr(r){return new TypeError("You provided "+(r!==null&&typeof r=="object"?"an invalid object":"'"+r+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function vr(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var dr=vr();function br(r){return y(r==null?void 0:r[dr])}function mr(r){return W(this,arguments,function(){var e,n,i,o;return C(this,function(c){switch(c.label){case 0:e=r.getReader(),c.label=1;case 1:c.trys.push([1,,9,10]),c.label=2;case 2:return[4,A(e.read())];case 3:return n=c.sent(),i=n.value,o=n.done,o?[4,A(void 0)]:[3,5];case 4:return[2,c.sent()];case 5:return[4,A(i)];case 6:return[4,c.sent()];case 7:return c.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Ar(r){return y(r==null?void 0:r.getReader)}function Sr(r){if(r instanceof b)return r;if(r!=null){if(hr(r))return _r(r);if(fr(r))return wr(r);if(lr(r))return gr(r);if(yr(r))return F(r);if(br(r))return Tr(r);if(Ar(r))return Or(r)}throw pr(r)}function _r(r){return new b(function(t){var e=r[B]();if(y(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function wr(r){return new b(function(t){for(var e=0;e<r.length&&!t.closed;e++)t.next(r[e]);t.complete()})}function gr(r){return new b(function(t){r.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,D)})}function Tr(r){return new b(function(t){var e,n;try{for(var i=_(r),o=i.next();!o.done;o=i.next()){var c=o.value;if(t.next(c),t.closed)return}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}t.complete()})}function F(r){return new b(function(t){Pr(r,t).catch(function(e){return t.error(e)})})}function Or(r){return F(mr(r))}function Pr(r,t){var e,n,i,o;return N(this,void 0,void 0,function(){var c,a;return C(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),e=Q(r),s.label=1;case 1:return[4,e.next()];case 2:if(n=s.sent(),!!n.done)return[3,4];if(c=n.value,t.next(c),t.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=s.sent(),i={error:a},[3,11];case 6:return s.trys.push([6,,9,10]),n&&!n.done&&(o=e.return)?[4,o.call(e)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function M(r,t){t===void 0&&(t={});var e=t.selector,n=V(t,["selector"]);return new b(function(i){var o=new AbortController,c=o.signal,a=!0,s=n.signal;if(s)if(s.aborted)o.abort();else{var u=function(){c.aborted||o.abort()};s.addEventListener("abort",u),i.add(function(){return s.removeEventListener("abort",u)})}var l=g(g({},n),{signal:c}),p=function(v){a=!1,i.error(v)};return fetch(r,l).then(function(v){e?Sr(e(v)).subscribe(or(i,void 0,function(){a=!1,i.complete()},p)):(a=!1,i.next(v),i.complete())}).catch(p),function(){a&&o.abort()}})}class Ir extends J.CustomLogger{constructor(){super();m(this,"API_AUTH_BACK_URL");m(this,"API_AUTH_BACK_USERNAME_AUTH");m(this,"API_AUTH_BACK_PASSWORD_AUTH");m(this,"headers");m(this,"ID",process.env.ID_FRONT??"NOT_AVAILABLE");this.API_AUTH_BACK_URL=process.env.API_AUTH_BACK_URL,this.API_AUTH_BACK_USERNAME_AUTH=process.env.API_AUTH_BACK_USERNAME_AUTH,this.API_AUTH_BACK_PASSWORD_AUTH=process.env.API_AUTH_BACK_PASSWORD_AUTH,this.headers={Accept:"application/json","Content-Type":"application/vnd.api+json"}}get(){return this.logDebug("get ServiceToken"),M(this.API_AUTH_BACK_URL,{method:"POST",headers:this.headers,body:JSON.stringify({data:{id:this.ID,type:"AuthUser",attributes:{username:this.API_AUTH_BACK_USERNAME_AUTH,password:this.API_AUTH_BACK_PASSWORD_AUTH}}})}).pipe(S.switchMap(e=>e.json()),S.switchMap(e=>{var n;return this.logDebug(`ServiceToken <URL>: \x1B[33m ${this.API_AUTH_BACK_URL} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(this.headers)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(e)} \x1B[37m`),S.of(((n=e==null?void 0:e.data.attributes)==null?void 0:n.token)||"")}),S.catchError(e=>(this.logError(`ServiceToken ${e}`),S.of(""))))}}exports.ServiceToken=Ir;exports.fromFetch=M;
@@ -0,0 +1,9 @@
1
+ const i = [];
2
+ for (let n = 0; n < 256; ++n)
3
+ i.push((n + 256).toString(16).slice(1));
4
+ function c(n, u = 0) {
5
+ return (i[n[u + 0]] + i[n[u + 1]] + i[n[u + 2]] + i[n[u + 3]] + "-" + i[n[u + 4]] + i[n[u + 5]] + "-" + i[n[u + 6]] + i[n[u + 7]] + "-" + i[n[u + 8]] + i[n[u + 9]] + "-" + i[n[u + 10]] + i[n[u + 11]] + i[n[u + 12]] + i[n[u + 13]] + i[n[u + 14]] + i[n[u + 15]]).toLowerCase();
6
+ }
7
+ export {
8
+ c as u
9
+ };
@@ -1 +1 @@
1
- "use strict";const n=[];for(let i=0;i<256;++i)n.push((i+256).toString(16).slice(1));function c(i,u=0){return n[i[u+0]]+n[i[u+1]]+n[i[u+2]]+n[i[u+3]]+"-"+n[i[u+4]]+n[i[u+5]]+"-"+n[i[u+6]]+n[i[u+7]]+"-"+n[i[u+8]]+n[i[u+9]]+"-"+n[i[u+10]]+n[i[u+11]]+n[i[u+12]]+n[i[u+13]]+n[i[u+14]]+n[i[u+15]]}exports.unsafeStringify=c;
1
+ "use strict";const n=[];for(let i=0;i<256;++i)n.push((i+256).toString(16).slice(1));function c(i,u=0){return(n[i[u+0]]+n[i[u+1]]+n[i[u+2]]+n[i[u+3]]+"-"+n[i[u+4]]+n[i[u+5]]+"-"+n[i[u+6]]+n[i[u+7]]+"-"+n[i[u+8]]+n[i[u+9]]+"-"+n[i[u+10]]+n[i[u+11]]+n[i[u+12]]+n[i[u+13]]+n[i[u+14]]+n[i[u+15]]).toLowerCase()}exports.unsafeStringify=c;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-front-cli",
3
- "version": "2.3.2-next.0",
3
+ "version": "2.3.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/mp-front-cli-all.cjs",
@@ -82,18 +82,17 @@
82
82
  "peerDependencies": {
83
83
  "i18next": "25.2.0",
84
84
  "ioredis": "5.3.2",
85
- "next-auth": "4.24.13",
86
- "node-jose": "2.2.0",
85
+ "jose": "6.2.2",
86
+ "next-auth": "4.24.14",
87
87
  "rxjs": "7.8.1"
88
88
  },
89
89
  "dependencies": {
90
- "uuid": "9.0.1"
90
+ "uuid": "14.0.0"
91
91
  },
92
92
  "devDependencies": {
93
93
  "@eslint/eslintrc": "3.2.0",
94
94
  "@eslint/js": "9.19.0",
95
- "@types/node": "22.12.0",
96
- "@types/node-jose": "1.1.13",
95
+ "@types/node": "20.10.6",
97
96
  "@types/uuid": "10.0.0",
98
97
  "@typescript-eslint/eslint-plugin": "8.22.0",
99
98
  "eslint": "9.38.0",
@@ -102,8 +101,8 @@
102
101
  "globals": "15.14.0",
103
102
  "husky": "9.1.7",
104
103
  "typescript": "5.7.2",
105
- "vite": "6.4.1",
104
+ "vite": "6.4.2",
106
105
  "vite-plugin-dts": "4.5.0",
107
106
  "vite-tsconfig-paths": "5.1.4"
108
107
  }
109
- }
108
+ }
@@ -1,3 +0,0 @@
1
- "use strict";var q=Object.defineProperty;var G=(r,t,e)=>t in r?q(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var b=(r,t,e)=>G(r,typeof t!="symbol"?t+"":t,e);const A=require("rxjs"),J=require("./mp-front-cli-logger.cjs"),V=require("./mp-front-cli-encrypter.cjs");var O=function(r,t){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},O(r,t)};function x(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");O(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var g=function(){return g=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},g.apply(this,arguments)};function N(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e}function W(r,t,e,n){function i(o){return o instanceof e?o:new e(function(c){c(o)})}return new(e||(e=Promise))(function(o,c){function a(l){try{u(n.next(l))}catch(p){c(p)}}function s(l){try{u(n.throw(l))}catch(p){c(p)}}function u(l){l.done?o(l.value):i(l.value).then(a,s)}u((n=n.apply(r,t||[])).next())})}function C(r,t){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,c=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return c.next=a(0),c.throw=a(1),c.return=a(2),typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function a(u){return function(l){return s([u,l])}}function s(u){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,u[0]&&(e=0)),e;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return e.label++,{value:u[1],done:!1};case 5:e.label++,i=u[1],u=[0];continue;case 7:u=e.ops.pop(),e.trys.pop();continue;default:if(o=e.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){e.label=u[1];break}if(u[0]===6&&e.label<o[1]){e.label=o[1],o=u;break}if(o&&e.label<o[2]){e.label=o[2],e.ops.push(u);break}o[2]&&e.ops.pop(),e.trys.pop();continue}u=t.call(r,e)}catch(l){u=[6,l],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function _(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function E(r,t){var e=typeof Symbol=="function"&&r[Symbol.iterator];if(!e)return r;var n=e.call(r),i,o=[],c;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){c={error:a}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(c)throw c.error}}return o}function P(r,t,e){if(e||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return r.concat(o||Array.prototype.slice.call(t))}function S(r){return this instanceof S?(this.v=r,this):new S(r)}function Q(r,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(r,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",c),i[Symbol.asyncIterator]=function(){return this},i;function c(f){return function(d){return Promise.resolve(d).then(f,p)}}function a(f,d){n[f]&&(i[f]=function(h){return new Promise(function(Y,$){o.push([f,h,Y,$])>1||s(f,h)})},d&&(i[f]=d(i[f])))}function s(f,d){try{u(n[f](d))}catch(h){v(o[0][3],h)}}function u(f){f.value instanceof S?Promise.resolve(f.value.v).then(l,p):v(o[0][2],f)}function l(f){s("next",f)}function p(f){s("throw",f)}function v(f,d){f(d),o.shift(),o.length&&s(o[0][0],o[0][1])}}function X(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=r[Symbol.asyncIterator],e;return t?t.call(r):(r=typeof _=="function"?_(r):r[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(o){e[o]=r[o]&&function(c){return new Promise(function(a,s){c=r[o](c),i(a,s,c.done,c.value)})}}function i(o,c,a,s){Promise.resolve(s).then(function(u){o({value:u,done:a})},c)}}function y(r){return typeof r=="function"}function Z(r){var t=function(n){Error.call(n),n.stack=new Error().stack},e=r(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var T=Z(function(r){return function(e){r(this),this.message=e?e.length+` errors occurred during unsubscription:
2
- `+e.map(function(n,i){return i+1+") "+n.toString()}).join(`
3
- `):"",this.name="UnsubscriptionError",this.errors=e}});function H(r,t){if(r){var e=r.indexOf(t);0<=e&&r.splice(e,1)}}var U=(function(){function r(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var t,e,n,i,o;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var a=_(c),s=a.next();!s.done;s=a.next()){var u=s.value;u.remove(this)}}catch(h){t={error:h}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else c.remove(this);var l=this.initialTeardown;if(y(l))try{l()}catch(h){o=h instanceof T?h.errors:[h]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var v=_(p),f=v.next();!f.done;f=v.next()){var d=f.value;try{j(d)}catch(h){o=o??[],h instanceof T?o=P(P([],E(o)),E(h.errors)):o.push(h)}}}catch(h){n={error:h}}finally{try{f&&!f.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}}if(o)throw new T(o)}},r.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)j(t);else{if(t instanceof r){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},r.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},r.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},r.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&H(e,t)},r.prototype.remove=function(t){var e=this._finalizers;e&&H(e,t),t instanceof r&&t._removeParent(this)},r.EMPTY=(function(){var t=new r;return t.closed=!0,t})(),r})();U.EMPTY;function K(r){return r instanceof U||r&&"closed"in r&&y(r.remove)&&y(r.add)&&y(r.unsubscribe)}function j(r){y(r)?r():r.unsubscribe()}var z={Promise:void 0},rr={setTimeout:function(r,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return setTimeout.apply(void 0,P([r,t],E(e)))},clearTimeout:function(r){return clearTimeout(r)},delegate:void 0};function D(r){rr.setTimeout(function(){throw r})}function k(){}function er(r){r()}var R=(function(r){x(t,r);function t(e){var n=r.call(this)||this;return n.isStopped=!1,e?(n.destination=e,K(e)&&e.add(n)):n.destination=or,n}return t.create=function(e,n,i){return new I(e,n,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(U),tr=(function(){function r(t){this.partialObserver=t}return r.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(n){w(n)}},r.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(n){w(n)}else w(t)},r.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){w(e)}},r})(),I=(function(r){x(t,r);function t(e,n,i){var o=r.call(this)||this,c;return y(e)||!e?c={next:e??void 0,error:n??void 0,complete:i??void 0}:c=e,o.destination=new tr(c),o}return t})(R);function w(r){D(r)}function nr(r){throw r}var or={closed:!0,next:k,error:nr,complete:k};function ir(r,t,e,n,i){return new cr(r,t,e,n,i)}var cr=(function(r){x(t,r);function t(e,n,i,o,c,a){var s=r.call(this,e)||this;return s.onFinalize=c,s.shouldUnsubscribe=a,s._next=n?function(u){try{n(u)}catch(l){e.error(l)}}:r.prototype._next,s._error=o?function(u){try{o(u)}catch(l){e.error(l)}finally{this.unsubscribe()}}:r.prototype._error,s._complete=i?function(){try{i()}catch(u){e.error(u)}finally{this.unsubscribe()}}:r.prototype._complete,s}return t.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;r.prototype.unsubscribe.call(this),!n&&((e=this.onFinalize)===null||e===void 0||e.call(this))}},t})(R),B=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function ur(r){return r}function sr(r){return r.length===0?ur:r.length===1?r[0]:function(e){return r.reduce(function(n,i){return i(n)},e)}}var m=(function(){function r(t){t&&(this._subscribe=t)}return r.prototype.lift=function(t){var e=new r;return e.source=this,e.operator=t,e},r.prototype.subscribe=function(t,e,n){var i=this,o=fr(t)?t:new I(t,e,n);return er(function(){var c=i,a=c.operator,s=c.source;o.add(a?a.call(o,s):s?i._subscribe(o):i._trySubscribe(o))}),o},r.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},r.prototype.forEach=function(t,e){var n=this;return e=L(e),new e(function(i,o){var c=new I({next:function(a){try{t(a)}catch(s){o(s),c.unsubscribe()}},error:o,complete:i});n.subscribe(c)})},r.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},r.prototype[B]=function(){return this},r.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return sr(t)(this)},r.prototype.toPromise=function(t){var e=this;return t=L(t),new t(function(n,i){var o;e.subscribe(function(c){return o=c},function(c){return i(c)},function(){return n(o)})})},r.create=function(t){return new r(t)},r})();function L(r){var t;return(t=r??z.Promise)!==null&&t!==void 0?t:Promise}function ar(r){return r&&y(r.next)&&y(r.error)&&y(r.complete)}function fr(r){return r&&r instanceof R||ar(r)&&K(r)}var lr=(function(r){return r&&typeof r.length=="number"&&typeof r!="function"});function hr(r){return y(r==null?void 0:r.then)}function yr(r){return y(r[B])}function pr(r){return Symbol.asyncIterator&&y(r==null?void 0:r[Symbol.asyncIterator])}function vr(r){return new TypeError("You provided "+(r!==null&&typeof r=="object"?"an invalid object":"'"+r+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function dr(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var br=dr();function mr(r){return y(r==null?void 0:r[br])}function Ar(r){return Q(this,arguments,function(){var e,n,i,o;return C(this,function(c){switch(c.label){case 0:e=r.getReader(),c.label=1;case 1:c.trys.push([1,,9,10]),c.label=2;case 2:return[4,S(e.read())];case 3:return n=c.sent(),i=n.value,o=n.done,o?[4,S(void 0)]:[3,5];case 4:return[2,c.sent()];case 5:return[4,S(i)];case 6:return[4,c.sent()];case 7:return c.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Sr(r){return y(r==null?void 0:r.getReader)}function _r(r){if(r instanceof m)return r;if(r!=null){if(yr(r))return wr(r);if(lr(r))return gr(r);if(hr(r))return Tr(r);if(pr(r))return F(r);if(mr(r))return Or(r);if(Sr(r))return Er(r)}throw vr(r)}function wr(r){return new m(function(t){var e=r[B]();if(y(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function gr(r){return new m(function(t){for(var e=0;e<r.length&&!t.closed;e++)t.next(r[e]);t.complete()})}function Tr(r){return new m(function(t){r.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,D)})}function Or(r){return new m(function(t){var e,n;try{for(var i=_(r),o=i.next();!o.done;o=i.next()){var c=o.value;if(t.next(c),t.closed)return}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}t.complete()})}function F(r){return new m(function(t){Pr(r,t).catch(function(e){return t.error(e)})})}function Er(r){return F(Ar(r))}function Pr(r,t){var e,n,i,o;return W(this,void 0,void 0,function(){var c,a;return C(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),e=X(r),s.label=1;case 1:return[4,e.next()];case 2:if(n=s.sent(),!!n.done)return[3,4];if(c=n.value,t.next(c),t.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=s.sent(),i={error:a},[3,11];case 6:return s.trys.push([6,,9,10]),n&&!n.done&&(o=e.return)?[4,o.call(e)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function M(r,t){t===void 0&&(t={});var e=t.selector,n=N(t,["selector"]);return new m(function(i){var o=new AbortController,c=o.signal,a=!0,s=n.signal;if(s)if(s.aborted)o.abort();else{var u=function(){c.aborted||o.abort()};s.addEventListener("abort",u),i.add(function(){return s.removeEventListener("abort",u)})}var l=g(g({},n),{signal:c}),p=function(v){a=!1,i.error(v)};return fetch(r,l).then(function(v){e?_r(e(v)).subscribe(ir(i,void 0,function(){a=!1,i.complete()},p)):(a=!1,i.next(v),i.complete())}).catch(p),function(){a&&o.abort()}})}class Ir extends J.CustomLogger{constructor(){super();b(this,"customEncrypter",new V.CustomEncrypter("aes"));b(this,"API_AUTH_BACK_URL");b(this,"API_AUTH_BACK_USERNAME_AUTH");b(this,"API_AUTH_BACK_PASSWORD_AUTH");b(this,"headers");b(this,"ID",process.env.ID_FRONT??"NOT_AVAILABLE");this.API_AUTH_BACK_URL=process.env.API_AUTH_BACK_URL,this.API_AUTH_BACK_USERNAME_AUTH=process.env.API_AUTH_BACK_USERNAME_AUTH,this.API_AUTH_BACK_PASSWORD_AUTH=process.env.API_AUTH_BACK_PASSWORD_AUTH,this.headers={Accept:"application/json","Content-Type":"application/vnd.api+json"}}get(e=!1){this.logDebug("get ServiceToken");const n={username:this.API_AUTH_BACK_USERNAME_AUTH,password:this.API_AUTH_BACK_PASSWORD_AUTH};return M(this.API_AUTH_BACK_URL,{method:"POST",headers:this.headers,body:JSON.stringify({data:{id:this.ID,type:"AuthUser",attributes:e?{encrypted:this.customEncrypter.encrypt(n)}:n}})}).pipe(A.switchMap(i=>i.json()),A.switchMap(i=>{var o,c;return this.logDebug(`ServiceToken <URL>: \x1B[33m ${this.API_AUTH_BACK_URL} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(this.headers)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(i)} \x1B[37m`),e?A.of(((o=i==null?void 0:i.data.attributes)==null?void 0:o.token)||""):A.of(this.customEncrypter.decrypt(((c=i==null?void 0:i.data.attributes)==null?void 0:c.encrypted)||""))}),A.catchError(i=>(this.logError(`ServiceToken ${i}`),A.of(""))))}}exports.ServiceToken=Ir;exports.fromFetch=M;
@@ -1,9 +0,0 @@
1
- const i = [];
2
- for (let n = 0; n < 256; ++n)
3
- i.push((n + 256).toString(16).slice(1));
4
- function c(n, u = 0) {
5
- return i[n[u + 0]] + i[n[u + 1]] + i[n[u + 2]] + i[n[u + 3]] + "-" + i[n[u + 4]] + i[n[u + 5]] + "-" + i[n[u + 6]] + i[n[u + 7]] + "-" + i[n[u + 8]] + i[n[u + 9]] + "-" + i[n[u + 10]] + i[n[u + 11]] + i[n[u + 12]] + i[n[u + 13]] + i[n[u + 14]] + i[n[u + 15]];
6
- }
7
- export {
8
- c as u
9
- };