@vendure/ui-devkit 1.9.4 → 2.0.0-beta.0
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/client/index.js +1 -1
- package/compiler/compile.js +25 -21
- package/compiler/compile.js.map +1 -1
- package/compiler/index.js +5 -1
- package/compiler/index.js.map +1 -1
- package/compiler/scaffold.js +66 -20
- package/compiler/scaffold.js.map +1 -1
- package/compiler/translations.js +9 -8
- package/compiler/translations.js.map +1 -1
- package/compiler/types.d.ts +104 -4
- package/compiler/utils.d.ts +2 -2
- package/compiler/utils.js +9 -6
- package/compiler/utils.js.map +1 -1
- package/package.json +61 -62
- package/scaffold/angular.json +13 -3
- package/scaffold/src/main.ts +1 -1
- package/scaffold/src/styles/global-styles.scss +1 -0
- package/scaffold/tsconfig.json +4 -3
- package/scaffold/src/global-styles.scss +0 -1
package/client/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((r="undefined"!=typeof globalThis?globalThis:r||self).VendureUiClient={})}(this,(function(r){"use strict";var t=function(r,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])})(r,n)};function n(r,n){function e(){this.constructor=r}t(r,n),r.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}function e(r){return"function"==typeof r}var o=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(r){r&&(new Error).stack;o=r},get useDeprecatedSynchronousErrorHandling(){return o}};function s(r){setTimeout((function(){throw r}),0)}var u={closed:!0,next:function(r){},error:function(r){if(i.useDeprecatedSynchronousErrorHandling)throw r;s(r)},complete:function(){}},c=function(){return Array.isArray||function(r){return r&&"number"==typeof r.length}}();var a=function(){function r(r){return Error.call(this),this.message=r?r.length+" errors occurred during unsubscription:\n"+r.map((function(r,t){return t+1+") "+r.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=r,this}return r.prototype=Object.create(Error.prototype),r}(),h=function(){function r(r){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,r&&(this._ctorUnsubscribe=!0,this._unsubscribe=r)}return r.prototype.unsubscribe=function(){var t;if(!this.closed){var n,o=this,i=o._parentOrParents,s=o._ctorUnsubscribe,u=o._unsubscribe,h=o._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i instanceof r)i.remove(this);else if(null!==i)for(var f=0;f<i.length;++f){i[f].remove(this)}if(e(u)){s&&(this._unsubscribe=void 0);try{u.call(this)}catch(r){t=r instanceof a?p(r.errors):[r]}}if(c(h)){f=-1;for(var l=h.length;++f<l;){var b=h[f];if(null!==(n=b)&&"object"==typeof n)try{b.unsubscribe()}catch(r){t=t||[],r instanceof a?t=t.concat(p(r.errors)):t.push(r)}}}if(t)throw new a(t)}},r.prototype.add=function(t){var n=t;if(!t)return r.EMPTY;switch(typeof t){case"function":n=new r(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof r)){var e=n;(n=new r)._subscriptions=[e]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof r){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},r.prototype.remove=function(r){var t=this._subscriptions;if(t){var n=t.indexOf(r);-1!==n&&t.splice(n,1)}},r.EMPTY=function(r){return r.closed=!0,r}(new r),r}();function p(r){return r.reduce((function(r,t){return r.concat(t instanceof a?t.errors:t)}),[])}var f=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),l=function(r){function t(n,e,o){var i=r.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=u;break;case 1:if(!n){i.destination=u;break}if("object"==typeof n){n instanceof t?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new b(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new b(i,n,e,o)}return i}return n(t,r),t.prototype[f]=function(){return this},t.create=function(r,n,e){var o=new t(r,n,e);return o.syncErrorThrowable=!1,o},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},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))},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){this.destination.error(r),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var r=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=r,this},t}(h),b=function(r){function t(t,n,o,i){var s,c=r.call(this)||this;c._parentSubscriber=t;var a=c;return e(n)?s=n:n&&(s=n.next,o=n.error,i=n.complete,n!==u&&(e((a=Object.create(n)).unsubscribe)&&c.add(a.unsubscribe.bind(a)),a.unsubscribe=c.unsubscribe.bind(c))),c._context=a,c._next=s,c._error=o,c._complete=i,c}return n(t,r),t.prototype.next=function(r){if(!this.isStopped&&this._next){var t=this._parentSubscriber;i.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,r)&&this.unsubscribe():this.__tryOrUnsub(this._next,r)}},t.prototype.error=function(r){if(!this.isStopped){var t=this._parentSubscriber,n=i.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,r),this.unsubscribe()):(this.__tryOrUnsub(this._error,r),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=r,t.syncErrorThrown=!0):s(r),this.unsubscribe();else{if(this.unsubscribe(),n)throw r;s(r)}}},t.prototype.complete=function(){var r=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return r._complete.call(r._context)};i.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(r,t){try{r.call(this._context,t)}catch(r){if(this.unsubscribe(),i.useDeprecatedSynchronousErrorHandling)throw r;s(r)}},t.prototype.__tryOrSetError=function(r,t,n){if(!i.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return i.useDeprecatedSynchronousErrorHandling?(r.syncErrorValue=t,r.syncErrorThrown=!0,!0):(s(t),!0)}return!1},t.prototype._unsubscribe=function(){var r=this._parentSubscriber;this._context=null,this._parentSubscriber=null,r.unsubscribe()},t}(l);var d=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function y(r){return r}function _(r){return 0===r.length?y:1===r.length?r[0]:function(t){return r.reduce((function(r,t){return t(r)}),t)}}var v=function(){function r(r){this._isScalar=!1,r&&(this._subscribe=r)}return r.prototype.lift=function(t){var n=new r;return n.source=this,n.operator=t,n},r.prototype.subscribe=function(r,t,n){var e=this.operator,o=function(r,t,n){if(r){if(r instanceof l)return r;if(r[f])return r[f]()}return r||t||n?new l(r,t,n):new l(u)}(r,t,n);if(e?o.add(e.call(o,this.source)):o.add(this.source||i.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),i.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},r.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(t){i.useDeprecatedSynchronousErrorHandling&&(r.syncErrorThrown=!0,r.syncErrorValue=t),!function(r){for(;r;){var t=r,n=t.closed,e=t.destination,o=t.isStopped;if(n||o)return!1;r=e&&e instanceof l?e:null}return!0}(r)?console.warn(t):r.error(t)}},r.prototype.forEach=function(r,t){var n=this;return new(t=w(t))((function(t,e){var o;o=n.subscribe((function(t){try{r(t)}catch(r){e(r),o&&o.unsubscribe()}}),e,t)}))},r.prototype._subscribe=function(r){var t=this.source;return t&&t.subscribe(r)},r.prototype[d]=function(){return this},r.prototype.pipe=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return 0===r.length?this:_(r)(this)},r.prototype.toPromise=function(r){var t=this;return new(r=w(r))((function(r,n){var e;t.subscribe((function(r){return e=r}),(function(r){return n(r)}),(function(){return r(e)}))}))},r.create=function(t){return new r(t)},r}();function w(r){if(r||(r=i.Promise||Promise),!r)throw new Error("no Promise impl found");return r}var E=new v((function(r){return r.complete()}));function m(r){return r?function(r){return new v((function(t){return r.schedule((function(){return t.complete()}))}))}(r):E}var g=function(){function r(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return r.prototype=Object.create(Error.prototype),r}();function S(r){return function(t){return 0===r?m():t.lift(new O(r))}}var O=function(){function r(r){if(this.total=r,this.total<0)throw new g}return r.prototype.call=function(r,t){return t.subscribe(new x(r,this.total))},r}(),x=function(r){function t(t,n){var e=r.call(this,t)||this;return e.total=n,e.count=0,e}return n(t,r),t.prototype._next=function(r){var t=this.total,n=++this.count;n<=t&&(this.destination.next(r),n===t&&(this.destination.complete(),this.unsubscribe()))},t}(l),P="http://localhost:3000";function T(r,t){var n=r+"__"+Math.random().toString(36).substr(3),e={requestId:n,type:r,data:t};return new v((function(r){var t=window.opener||window.parent,o=function(){t.postMessage({requestId:n,type:"cancellation",data:null},P)};return window.addEventListener("message",(function(t){var e=t.data;if(e&&e.requestId===n){if(e.complete)return r.complete(),void o();if(e.error)return r.error(e.data),void o();r.next(e.data)}})),t.postMessage(e,P),o}))}r.getActivatedRoute=function(){return T("active-route",{}).toPromise()},r.graphQlMutation=function(r,t){var n=T("graphql-mutation",{document:r,variables:t});return{then:function(){for(var r,t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(r=n.pipe(S(1)).toPromise()).then.apply(r,t)},stream:n}},r.graphQlQuery=function(r,t,n){var e=T("graphql-query",{document:r,variables:t,fetchPolicy:n});return{then:function(){for(var r,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(r=e.pipe(S(1)).toPromise()).then.apply(r,t)},stream:e}},r.notify=function(r){T("notification",r).toPromise()},r.setTargetOrigin=function(r){P=r},Object.defineProperty(r,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self).VendureUiClient={})}(this,(function(t){"use strict";var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])},r(t,e)};function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function n(t){var r="function"==typeof Symbol&&Symbol.iterator,e=r&&t[r],n=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(t,r){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var n,o,i=e.call(t),u=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return u}function i(t,r,e){if(e||2===arguments.length)for(var n,o=0,i=r.length;o<i;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return t.concat(n||Array.prototype.slice.call(r))}function u(t){return"function"==typeof t}var c,s=((c=function(t){return function(r){t(this),this.message=r?r.length+" errors occurred during unsubscription:\n"+r.map((function(t,r){return r+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=r}}((function(t){Error.call(t),t.stack=(new Error).stack}))).prototype=Object.create(Error.prototype),c.prototype.constructor=c,c);function a(t,r){if(t){var e=t.indexOf(r);0<=e&&t.splice(e,1)}}var l=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var r;return t.prototype.unsubscribe=function(){var t,r,e,c,a;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var f=n(l),h=f.next();!h.done;h=f.next()){h.value.remove(this)}}catch(r){t={error:r}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}else l.remove(this);var y=this.initialTeardown;if(u(y))try{y()}catch(t){a=t instanceof s?t.errors:[t]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var v=n(d),b=v.next();!b.done;b=v.next()){var m=b.value;try{p(m)}catch(t){a=null!=a?a:[],t instanceof s?a=i(i([],o(a)),o(t.errors)):a.push(t)}}}catch(t){e={error:t}}finally{try{b&&!b.done&&(c=v.return)&&c.call(v)}finally{if(e)throw e.error}}}if(a)throw new s(a)}},t.prototype.add=function(r){var e;if(r&&r!==this)if(this.closed)p(r);else{if(r instanceof t){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(r)}},t.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},t.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},t.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&a(r,t)},t.prototype.remove=function(r){var e=this._finalizers;e&&a(e,r),r instanceof t&&r._removeParent(this)},t.EMPTY=((r=new t).closed=!0,r),t}();function f(t){return t instanceof l||t&&"closed"in t&&u(t.remove)&&u(t.add)&&u(t.unsubscribe)}function p(t){u(t)?t():t.unsubscribe()}l.EMPTY;var h={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},y={setTimeout:function(t,r){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];var u=y.delegate;return(null==u?void 0:u.setTimeout)?u.setTimeout.apply(u,i([t,r],o(e))):setTimeout.apply(void 0,i([t,r],o(e)))},clearTimeout:function(t){var r=y.delegate;return((null==r?void 0:r.clearTimeout)||clearTimeout)(t)},delegate:void 0};function d(){}var v=function(t){function r(r){var e=t.call(this)||this;return e.isStopped=!1,r?(e.destination=r,f(r)&&r.add(e)):e.destination=x,e}return e(r,t),r.create=function(t,r,e){return new g(t,r,e)},r.prototype.next=function(t){this.isStopped||this._next(t)},r.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},r.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(t){this.destination.next(t)},r.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(l),b=Function.prototype.bind;function m(t,r){return b.call(t,r)}var _=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(t){w(t)}},t.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(t){w(t)}else w(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){w(t)}},t}(),g=function(t){function r(r,e,n){var o,i,c=t.call(this)||this;u(r)||!r?o={next:null!=r?r:void 0,error:null!=e?e:void 0,complete:null!=n?n:void 0}:c&&h.useDeprecatedNextContext?((i=Object.create(r)).unsubscribe=function(){return c.unsubscribe()},o={next:r.next&&m(r.next,i),error:r.error&&m(r.error,i),complete:r.complete&&m(r.complete,i)}):o=r;return c.destination=new _(o),c}return e(r,t),r}(v);function w(t){var r;r=t,y.setTimeout((function(){throw r}))}var x={closed:!0,next:d,error:function(t){throw t},complete:d},S="function"==typeof Symbol&&Symbol.observable||"@@observable";function P(t){return t}var T=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(r){var e=new t;return e.source=this,e.operator=r,e},t.prototype.subscribe=function(t,r,e){var n,o=this,i=(n=t)&&n instanceof v||function(t){return t&&u(t.next)&&u(t.error)&&u(t.complete)}(n)&&f(n)?t:new g(t,r,e);return function(){var t=o,r=t.operator,e=t.source;i.add(r?r.call(i,e):e?o._subscribe(i):o._trySubscribe(i))}(),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},t.prototype.forEach=function(t,r){var e=this;return new(r=O(r))((function(r,n){var o=new g({next:function(r){try{t(r)}catch(t){n(t),o.unsubscribe()}},error:n,complete:r});e.subscribe(o)}))},t.prototype._subscribe=function(t){var r;return null===(r=this.source)||void 0===r?void 0:r.subscribe(t)},t.prototype[S]=function(){return this},t.prototype.pipe=function(){for(var t,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return(0===(t=r).length?P:1===t.length?t[0]:function(r){return t.reduce((function(t,r){return r(t)}),r)})(this)},t.prototype.toPromise=function(t){var r=this;return new(t=O(t))((function(t,e){var n;r.subscribe((function(t){return n=t}),(function(t){return e(t)}),(function(){return t(n)}))}))},t.create=function(r){return new t(r)},t}();function O(t){var r;return null!==(r=null!=t?t:h.Promise)&&void 0!==r?r:Promise}function E(t){return function(r){if(function(t){return u(null==t?void 0:t.lift)}(r))return r.lift((function(r){try{return t(r,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")}}var A=function(t){function r(r,e,n,o,i,u){var c=t.call(this,r)||this;return c.onFinalize=i,c.shouldUnsubscribe=u,c._next=e?function(t){try{e(t)}catch(t){r.error(t)}}:t.prototype._next,c._error=o?function(t){try{o(t)}catch(t){r.error(t)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=n?function(){try{n()}catch(t){r.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e(r,t),r.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var e=this.closed;t.prototype.unsubscribe.call(this),!e&&(null===(r=this.onFinalize)||void 0===r||r.call(this))}},r}(v),j=new T((function(t){return t.complete()}));function z(t){return t<=0?function(){return j}:E((function(r,e){var n,o,i,u=0;r.subscribe(new A(e,(function(r){++u<=t&&(e.next(r),t<=u&&e.complete())}),n,o,i))}))}var U="http://localhost:3000";function q(t,r){var e=t+"__"+Math.random().toString(36).substr(3),n={requestId:e,type:t,data:r};return new T((function(t){var r=window.opener||window.parent,o=function(){r.postMessage({requestId:e,type:"cancellation",data:null},U)};return window.addEventListener("message",(function(r){var n=r.data;if(n&&n.requestId===e){if(n.complete)return t.complete(),void o();if(n.error)return t.error(n.data),void o();t.next(n.data)}})),r.postMessage(n,U),o}))}t.getActivatedRoute=function(){return q("active-route",{}).toPromise()},t.graphQlMutation=function(t,r){var e=q("graphql-mutation",{document:t,variables:r});return{then:function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return(t=e.pipe(z(1)).toPromise()).then.apply(t,r)},stream:e}},t.graphQlQuery=function(t,r,e){var n=q("graphql-query",{document:t,variables:r,fetchPolicy:e});return{then:function(){for(var t,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return(t=n.pipe(z(1)).toPromise()).then.apply(t,r)},stream:n}},t.notify=function(t){q("notification",t).toPromise()},t.setTargetOrigin=function(t){U=t}}));
|
package/compiler/compile.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -36,7 +40,7 @@ const utils_1 = require("./utils");
|
|
|
36
40
|
*/
|
|
37
41
|
function compileUiExtensions(options) {
|
|
38
42
|
const { outputPath, baseHref, devMode, watchPort, extensions, command, additionalProcessArguments } = options;
|
|
39
|
-
const usingYarn = options.command && options.command === 'npm' ? false : utils_1.shouldUseYarn();
|
|
43
|
+
const usingYarn = options.command && options.command === 'npm' ? false : (0, utils_1.shouldUseYarn)();
|
|
40
44
|
if (devMode) {
|
|
41
45
|
return runWatchMode(outputPath, baseHref || constants_1.DEFAULT_BASE_HREF, watchPort || 4200, extensions, usingYarn, additionalProcessArguments);
|
|
42
46
|
}
|
|
@@ -49,13 +53,13 @@ function runCompileMode(outputPath, baseHref, extensions, usingYarn, args) {
|
|
|
49
53
|
const cmd = usingYarn ? 'yarn' : 'npm';
|
|
50
54
|
const distPath = path.join(outputPath, 'dist');
|
|
51
55
|
const compile = () => new Promise(async (resolve, reject) => {
|
|
52
|
-
await scaffold_1.setupScaffold(outputPath, extensions);
|
|
53
|
-
const commandArgs = ['run', 'build', `--
|
|
56
|
+
await (0, scaffold_1.setupScaffold)(outputPath, extensions);
|
|
57
|
+
const commandArgs = ['run', 'build', `--base-href=${baseHref}`, ...buildProcessArguments(args)];
|
|
54
58
|
if (!usingYarn) {
|
|
55
59
|
// npm requires `--` before any command line args being passed to a script
|
|
56
60
|
commandArgs.splice(2, 0, '--');
|
|
57
61
|
}
|
|
58
|
-
const buildProcess = child_process_1.spawn(cmd, commandArgs, {
|
|
62
|
+
const buildProcess = (0, child_process_1.spawn)(cmd, commandArgs, {
|
|
59
63
|
cwd: outputPath,
|
|
60
64
|
shell: true,
|
|
61
65
|
stdio: 'inherit',
|
|
@@ -84,13 +88,13 @@ function runWatchMode(outputPath, baseHref, port, extensions, usingYarn, args) {
|
|
|
84
88
|
/* */
|
|
85
89
|
};
|
|
86
90
|
const compile = () => new Promise(async (resolve, reject) => {
|
|
87
|
-
await scaffold_1.setupScaffold(outputPath, extensions);
|
|
91
|
+
await (0, scaffold_1.setupScaffold)(outputPath, extensions);
|
|
88
92
|
const adminUiExtensions = extensions.filter(utils_1.isAdminUiExtension);
|
|
89
|
-
const normalizedExtensions = utils_1.normalizeExtensions(adminUiExtensions);
|
|
93
|
+
const normalizedExtensions = (0, utils_1.normalizeExtensions)(adminUiExtensions);
|
|
90
94
|
const globalStylesExtensions = extensions.filter(utils_1.isGlobalStylesExtension);
|
|
91
95
|
const staticAssetExtensions = extensions.filter(utils_1.isStaticAssetExtension);
|
|
92
|
-
const allTranslationFiles = translations_1.getAllTranslationFiles(extensions.filter(utils_1.isTranslationExtension));
|
|
93
|
-
buildProcess = child_process_1.spawn(cmd, ['run', 'start', `--port=${port}`, `--base-href=${baseHref}`, ...buildProcessArguments(args)], {
|
|
96
|
+
const allTranslationFiles = (0, translations_1.getAllTranslationFiles)(extensions.filter(utils_1.isTranslationExtension));
|
|
97
|
+
buildProcess = (0, child_process_1.spawn)(cmd, ['run', 'start', `--port=${port}`, `--base-href=${baseHref}`, ...buildProcessArguments(args)], {
|
|
94
98
|
cwd: outputPath,
|
|
95
99
|
shell: true,
|
|
96
100
|
stdio: 'inherit',
|
|
@@ -106,7 +110,7 @@ function runWatchMode(outputPath, baseHref, port, extensions, usingYarn, args) {
|
|
|
106
110
|
});
|
|
107
111
|
for (const extension of normalizedExtensions) {
|
|
108
112
|
if (!watcher) {
|
|
109
|
-
watcher = chokidar_1.watch(extension.extensionPath, {
|
|
113
|
+
watcher = (0, chokidar_1.watch)(extension.extensionPath, {
|
|
110
114
|
depth: 4,
|
|
111
115
|
ignored: '**/node_modules/',
|
|
112
116
|
});
|
|
@@ -117,9 +121,9 @@ function runWatchMode(outputPath, baseHref, port, extensions, usingYarn, args) {
|
|
|
117
121
|
}
|
|
118
122
|
for (const extension of staticAssetExtensions) {
|
|
119
123
|
for (const staticAssetDef of extension.staticAssets) {
|
|
120
|
-
const assetPath = utils_1.getStaticAssetPath(staticAssetDef);
|
|
124
|
+
const assetPath = (0, utils_1.getStaticAssetPath)(staticAssetDef);
|
|
121
125
|
if (!watcher) {
|
|
122
|
-
watcher = chokidar_1.watch(assetPath);
|
|
126
|
+
watcher = (0, chokidar_1.watch)(assetPath);
|
|
123
127
|
}
|
|
124
128
|
else {
|
|
125
129
|
watcher.add(assetPath);
|
|
@@ -132,7 +136,7 @@ function runWatchMode(outputPath, baseHref, port, extensions, usingYarn, args) {
|
|
|
132
136
|
: [extension.globalStyles];
|
|
133
137
|
for (const stylePath of globalStylePaths) {
|
|
134
138
|
if (!watcher) {
|
|
135
|
-
watcher = chokidar_1.watch(stylePath);
|
|
139
|
+
watcher = (0, chokidar_1.watch)(stylePath);
|
|
136
140
|
}
|
|
137
141
|
else {
|
|
138
142
|
watcher.add(stylePath);
|
|
@@ -145,7 +149,7 @@ function runWatchMode(outputPath, baseHref, port, extensions, usingYarn, args) {
|
|
|
145
149
|
}
|
|
146
150
|
for (const file of translationFiles) {
|
|
147
151
|
if (!watcher) {
|
|
148
|
-
watcher = chokidar_1.watch(file);
|
|
152
|
+
watcher = (0, chokidar_1.watch)(file);
|
|
149
153
|
}
|
|
150
154
|
else {
|
|
151
155
|
watcher.add(file);
|
|
@@ -171,27 +175,27 @@ function runWatchMode(outputPath, baseHref, port, extensions, usingYarn, args) {
|
|
|
171
175
|
await fs.copyFile(filePath, dest);
|
|
172
176
|
}
|
|
173
177
|
if (filePath.includes(devkitPath)) {
|
|
174
|
-
utils_1.copyUiDevkit(outputPath);
|
|
178
|
+
(0, utils_1.copyUiDevkit)(outputPath);
|
|
175
179
|
}
|
|
176
180
|
for (const staticAssetDef of allStaticAssetDefs) {
|
|
177
|
-
const assetPath = utils_1.getStaticAssetPath(staticAssetDef);
|
|
181
|
+
const assetPath = (0, utils_1.getStaticAssetPath)(staticAssetDef);
|
|
178
182
|
if (filePath.includes(assetPath)) {
|
|
179
|
-
await utils_1.copyStaticAsset(outputPath, staticAssetDef);
|
|
183
|
+
await (0, utils_1.copyStaticAsset)(outputPath, staticAssetDef);
|
|
180
184
|
return;
|
|
181
185
|
}
|
|
182
186
|
}
|
|
183
187
|
for (const stylePath of allGlobalStyles) {
|
|
184
188
|
if (filePath.includes(stylePath)) {
|
|
185
|
-
await scaffold_1.copyGlobalStyleFile(outputPath, stylePath);
|
|
189
|
+
await (0, scaffold_1.copyGlobalStyleFile)(outputPath, stylePath);
|
|
186
190
|
return;
|
|
187
191
|
}
|
|
188
192
|
}
|
|
189
193
|
for (const languageCode of Object.keys(allTranslationFiles)) {
|
|
190
|
-
//
|
|
194
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
191
195
|
const translationFiles = allTranslationFiles[languageCode];
|
|
192
196
|
for (const file of translationFiles) {
|
|
193
197
|
if (filePath.includes(path.normalize(file))) {
|
|
194
|
-
await translations_1.mergeExtensionTranslations(outputPath, {
|
|
198
|
+
await (0, translations_1.mergeExtensionTranslations)(outputPath, {
|
|
195
199
|
[languageCode]: translationFiles,
|
|
196
200
|
});
|
|
197
201
|
}
|
|
@@ -203,7 +207,7 @@ function runWatchMode(outputPath, baseHref, port, extensions, usingYarn, args) {
|
|
|
203
207
|
});
|
|
204
208
|
close = () => {
|
|
205
209
|
if (watcher) {
|
|
206
|
-
watcher.close();
|
|
210
|
+
void watcher.close();
|
|
207
211
|
}
|
|
208
212
|
if (buildProcess) {
|
|
209
213
|
buildProcess.kill();
|
package/compiler/compile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../src/compiler/compile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../src/compiler/compile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,iDAAoD;AACpD,uCAA6D;AAC7D,6CAA+B;AAC/B,2CAA6B;AAE7B,2CAAoE;AACpE,yCAAgE;AAChE,iDAAoF;AAOpF,mCAUiB;AAEjB;;;;;GAKG;AACH,SAAgB,mBAAmB,CAC/B,OAAmC;IAEnC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,0BAA0B,EAAE,GAC/F,OAAO,CAAC;IACZ,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAA,qBAAa,GAAE,CAAC;IACzF,IAAI,OAAO,EAAE;QACT,OAAO,YAAY,CACf,UAAU,EACV,QAAQ,IAAI,6BAAiB,EAC7B,SAAS,IAAI,IAAI,EACjB,UAAU,EACV,SAAS,EACT,0BAA0B,CAC7B,CAAC;KACL;SAAM;QACH,OAAO,cAAc,CACjB,UAAU,EACV,QAAQ,IAAI,6BAAiB,EAC7B,UAAU,EACV,SAAS,EACT,0BAA0B,CAC7B,CAAC;KACL;AACL,CAAC;AAxBD,kDAwBC;AAED,SAAS,cAAc,CACnB,UAAkB,EAClB,QAAgB,EAChB,UAAuB,EACvB,SAAkB,EAClB,IAA2C;IAE3C,MAAM,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;IACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAE/C,MAAM,OAA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AAC;IAC5B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,CAAC,QAAQ,CAAC,EAAE,CAAC;AACvF,CAAC;AAED,SAAS,qBAAqB,CAAC,IAA2C;IACtE,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QAC1B,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACpB,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,GAAG,CAAC;YAEzB,OAAO,GAAG,GAAG,IAAI,KAAe,EAAE,CAAC;SACtC;QAED,OAAO,GAAG,CAAC;IACf,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,eAAe,CAAC,QAAgB;IACrC,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAC1D,CAAC"}
|
package/compiler/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/compiler/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/compiler/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/compiler/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,4CAA0B;AAC1B,0CAAwB"}
|
package/compiler/scaffold.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -20,32 +24,34 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
24
|
};
|
|
21
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
26
|
exports.copyGlobalStyleFile = exports.setupScaffold = void 0;
|
|
23
|
-
/*
|
|
27
|
+
/* eslint-disable no-console */
|
|
24
28
|
const child_process_1 = require("child_process");
|
|
25
29
|
const fs = __importStar(require("fs-extra"));
|
|
30
|
+
const glob_1 = require("glob");
|
|
26
31
|
const path = __importStar(require("path"));
|
|
27
32
|
const constants_1 = require("./constants");
|
|
28
33
|
const translations_1 = require("./translations");
|
|
29
34
|
const utils_1 = require("./utils");
|
|
30
35
|
async function setupScaffold(outputPath, extensions) {
|
|
31
36
|
deleteExistingExtensionModules(outputPath);
|
|
32
|
-
copyAdminUiSource(outputPath);
|
|
33
37
|
const adminUiExtensions = extensions.filter(utils_1.isAdminUiExtension);
|
|
34
|
-
const normalizedExtensions = utils_1.normalizeExtensions(adminUiExtensions);
|
|
38
|
+
const normalizedExtensions = (0, utils_1.normalizeExtensions)(adminUiExtensions);
|
|
39
|
+
const modulePathMapping = generateModulePathMapping(normalizedExtensions);
|
|
40
|
+
copyAdminUiSource(outputPath, modulePathMapping);
|
|
35
41
|
await copyExtensionModules(outputPath, normalizedExtensions);
|
|
36
42
|
const staticAssetExtensions = extensions.filter(utils_1.isStaticAssetExtension);
|
|
37
43
|
await copyStaticAssets(outputPath, staticAssetExtensions);
|
|
38
44
|
const globalStyleExtensions = extensions.filter(utils_1.isGlobalStylesExtension);
|
|
39
45
|
const sassVariableOverridesExtension = extensions.find(utils_1.isSassVariableOverridesExtension);
|
|
40
46
|
await addGlobalStyles(outputPath, globalStyleExtensions, sassVariableOverridesExtension);
|
|
41
|
-
const allTranslationFiles = translations_1.getAllTranslationFiles(extensions.filter(utils_1.isTranslationExtension));
|
|
42
|
-
await translations_1.mergeExtensionTranslations(outputPath, allTranslationFiles);
|
|
43
|
-
utils_1.copyUiDevkit(outputPath);
|
|
47
|
+
const allTranslationFiles = (0, translations_1.getAllTranslationFiles)(extensions.filter(utils_1.isTranslationExtension));
|
|
48
|
+
await (0, translations_1.mergeExtensionTranslations)(outputPath, allTranslationFiles);
|
|
49
|
+
(0, utils_1.copyUiDevkit)(outputPath);
|
|
44
50
|
try {
|
|
45
51
|
await checkIfNgccWasRun();
|
|
46
52
|
}
|
|
47
53
|
catch (e) {
|
|
48
|
-
const cmd = utils_1.shouldUseYarn() ? 'yarn ngcc' : 'npx ngcc';
|
|
54
|
+
const cmd = (0, utils_1.shouldUseYarn)() ? 'yarn ngcc' : 'npx ngcc';
|
|
49
55
|
utils_1.logger.log(`An error occurred when running ngcc. Try removing node_modules, re-installing, and then manually running "${cmd}" in the project root.`);
|
|
50
56
|
}
|
|
51
57
|
}
|
|
@@ -57,6 +63,23 @@ exports.setupScaffold = setupScaffold;
|
|
|
57
63
|
function deleteExistingExtensionModules(outputPath) {
|
|
58
64
|
fs.removeSync(path.join(outputPath, constants_1.MODULES_OUTPUT_DIR));
|
|
59
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Generates a module path mapping object for all extensions with a "pathAlias"
|
|
68
|
+
* property declared (if any).
|
|
69
|
+
*/
|
|
70
|
+
function generateModulePathMapping(extensions) {
|
|
71
|
+
const extensionsWithAlias = extensions.filter(e => e.pathAlias);
|
|
72
|
+
if (extensionsWithAlias.length === 0) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
return extensionsWithAlias.reduce((acc, e) => {
|
|
76
|
+
// for imports from the index file if there is one
|
|
77
|
+
acc[e.pathAlias] = [`src/extensions/${e.id}`];
|
|
78
|
+
// direct access to files / deep imports
|
|
79
|
+
acc[`${e.pathAlias}/*`] = [`src/extensions/${e.id}/*`];
|
|
80
|
+
return acc;
|
|
81
|
+
}, {});
|
|
82
|
+
}
|
|
60
83
|
/**
|
|
61
84
|
* Copies all files from the extensionPaths of the configured extensions into the
|
|
62
85
|
* admin-ui source tree.
|
|
@@ -68,14 +91,23 @@ async function copyExtensionModules(outputPath, extensions) {
|
|
|
68
91
|
fs.writeFileSync(path.join(outputPath, constants_1.SHARED_EXTENSIONS_FILE), sharedExtensionModulesSource, 'utf8');
|
|
69
92
|
for (const extension of extensions) {
|
|
70
93
|
const dest = path.join(outputPath, constants_1.MODULES_OUTPUT_DIR, extension.id);
|
|
71
|
-
|
|
94
|
+
if (!extension.exclude) {
|
|
95
|
+
fs.copySync(extension.extensionPath, dest);
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
const exclude = extension.exclude
|
|
99
|
+
.map(e => (0, glob_1.globSync)(path.join(extension.extensionPath, e)))
|
|
100
|
+
.flatMap(e => e);
|
|
101
|
+
fs.copySync(extension.extensionPath, dest, {
|
|
102
|
+
filter: name => name === extension.extensionPath || exclude.every(e => e !== name),
|
|
103
|
+
});
|
|
72
104
|
}
|
|
73
105
|
}
|
|
74
106
|
async function copyStaticAssets(outputPath, extensions) {
|
|
75
107
|
for (const extension of extensions) {
|
|
76
108
|
if (Array.isArray(extension.staticAssets)) {
|
|
77
109
|
for (const asset of extension.staticAssets) {
|
|
78
|
-
await utils_1.copyStaticAsset(outputPath, asset);
|
|
110
|
+
await (0, utils_1.copyStaticAsset)(outputPath, asset);
|
|
79
111
|
}
|
|
80
112
|
}
|
|
81
113
|
}
|
|
@@ -101,7 +133,7 @@ async function addGlobalStyles(outputPath, globalStylesExtensions, sassVariableO
|
|
|
101
133
|
overridesImport = `@import "./${constants_1.GLOBAL_STYLES_OUTPUT_DIR}/${path.basename(overridesFile, path.extname(overridesFile))}";\n`;
|
|
102
134
|
}
|
|
103
135
|
const globalStylesSource = overridesImport +
|
|
104
|
-
|
|
136
|
+
'@import "./styles/styles";\n' +
|
|
105
137
|
imports.map(file => `@import "./${constants_1.GLOBAL_STYLES_OUTPUT_DIR}/${file}";`).join('\n');
|
|
106
138
|
const globalStylesFile = path.join(outputPath, 'src', 'global-styles.scss');
|
|
107
139
|
await fs.writeFile(globalStylesFile, globalStylesSource, 'utf-8');
|
|
@@ -152,13 +184,14 @@ function getModuleFilePath(id, module) {
|
|
|
152
184
|
return `./extensions/${id}/${path.basename(module.ngModuleFileName, '.ts')}`;
|
|
153
185
|
}
|
|
154
186
|
/**
|
|
155
|
-
*
|
|
156
|
-
*
|
|
187
|
+
* Copies the Admin UI sources & static assets to the outputPath if it does not already
|
|
188
|
+
* exist there.
|
|
157
189
|
*/
|
|
158
|
-
function copyAdminUiSource(outputPath) {
|
|
159
|
-
const
|
|
160
|
-
const
|
|
161
|
-
if (fs.existsSync(
|
|
190
|
+
function copyAdminUiSource(outputPath, modulePathMapping) {
|
|
191
|
+
const tsconfigFilePath = path.join(outputPath, 'tsconfig.json');
|
|
192
|
+
const indexFilePath = path.join(outputPath, '/src/index.html');
|
|
193
|
+
if (fs.existsSync(tsconfigFilePath) && fs.existsSync(indexFilePath)) {
|
|
194
|
+
configureModulePathMapping(tsconfigFilePath, modulePathMapping);
|
|
162
195
|
return;
|
|
163
196
|
}
|
|
164
197
|
const scaffoldDir = path.join(__dirname, '../scaffold');
|
|
@@ -173,11 +206,24 @@ function copyAdminUiSource(outputPath) {
|
|
|
173
206
|
fs.removeSync(outputPath);
|
|
174
207
|
fs.ensureDirSync(outputPath);
|
|
175
208
|
fs.copySync(scaffoldDir, outputPath);
|
|
209
|
+
configureModulePathMapping(tsconfigFilePath, modulePathMapping);
|
|
176
210
|
// copy source files from admin-ui package
|
|
177
211
|
const outputSrc = path.join(outputPath, 'src');
|
|
178
212
|
fs.ensureDirSync(outputSrc);
|
|
179
213
|
fs.copySync(adminUiSrc, outputSrc);
|
|
180
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Adds module path mapping to the bundled tsconfig.json file if defined as a UI extension.
|
|
217
|
+
*/
|
|
218
|
+
function configureModulePathMapping(tsconfigFilePath, modulePathMapping) {
|
|
219
|
+
if (!modulePathMapping) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
223
|
+
const tsconfig = require(tsconfigFilePath);
|
|
224
|
+
tsconfig.compilerOptions.paths = modulePathMapping;
|
|
225
|
+
fs.writeFileSync(tsconfigFilePath, JSON.stringify(tsconfig, null, 2));
|
|
226
|
+
}
|
|
181
227
|
/**
|
|
182
228
|
* Attempts to find out it the ngcc compiler has been run on the Angular packages, and if not,
|
|
183
229
|
* attemps to run it. This is done this way because attempting to run ngcc from a sub-directory
|
|
@@ -189,7 +235,7 @@ function copyAdminUiSource(outputPath) {
|
|
|
189
235
|
async function checkIfNgccWasRun() {
|
|
190
236
|
const coreUmdFile = require.resolve('@vendure/admin-ui/core');
|
|
191
237
|
if (!coreUmdFile) {
|
|
192
|
-
utils_1.logger.error(
|
|
238
|
+
utils_1.logger.error('Could not resolve the "@vendure/admin-ui/core" package!');
|
|
193
239
|
return;
|
|
194
240
|
}
|
|
195
241
|
// ngcc creates a particular folder after it has been run once
|
|
@@ -202,8 +248,8 @@ async function checkIfNgccWasRun() {
|
|
|
202
248
|
return new Promise((resolve, reject) => {
|
|
203
249
|
utils_1.logger.log('Running the Angular Ivy compatibility compiler (ngcc) on Vendure Admin UI dependencies ' +
|
|
204
250
|
'(this is only needed on the first run)...');
|
|
205
|
-
const cmd = utils_1.shouldUseYarn() ? 'yarn' : 'npx';
|
|
206
|
-
const ngccProcess = child_process_1.spawn(cmd, [
|
|
251
|
+
const cmd = (0, utils_1.shouldUseYarn)() ? 'yarn' : 'npx';
|
|
252
|
+
const ngccProcess = (0, child_process_1.spawn)(cmd, [
|
|
207
253
|
'ngcc',
|
|
208
254
|
'--properties es2015 browser module main',
|
|
209
255
|
'--first-only',
|
package/compiler/scaffold.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffold.js","sourceRoot":"","sources":["../src/compiler/scaffold.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scaffold.js","sourceRoot":"","sources":["../src/compiler/scaffold.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA+B;AAC/B,iDAAsC;AACtC,6CAA+B;AAC/B,+BAAgC;AAChC,2CAA6B;AAE7B,2CAKqB;AACrB,iDAAoF;AAUpF,mCAWiB;AAEV,KAAK,UAAU,aAAa,CAAC,UAAkB,EAAE,UAAuB;IAC3E,8BAA8B,CAAC,UAAU,CAAC,CAAC;IAE3C,MAAM,iBAAiB,GAAG,UAAU,CAAC,MAAM,CAAC,0BAAkB,CAAC,CAAC;IAChE,MAAM,oBAAoB,GAAG,IAAA,2BAAmB,EAAC,iBAAiB,CAAC,CAAC;IAEpE,MAAM,iBAAiB,GAAG,yBAAyB,CAAC,oBAAoB,CAAC,CAAC;IAC1E,iBAAiB,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IAEjD,MAAM,oBAAoB,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC;IAE7D,MAAM,qBAAqB,GAAG,UAAU,CAAC,MAAM,CAAC,8BAAsB,CAAC,CAAC;IACxE,MAAM,gBAAgB,C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C3B,UAAU;SACb,EACD;YACI,GAAG,EAAE,OAAO;YACZ,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,SAAS;SACnB,CACJ,CAAC;QAEF,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE;YAC3B,IAAI,IAAI,KAAK,CAAC,EAAE;gBACZ,MAAM,CAAC,IAAI,CAAC,CAAC;aAChB;iBAAM;gBACH,OAAO,EAAE,CAAC;aACb;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/compiler/translations.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -18,13 +22,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
18
22
|
__setModuleDefault(result, mod);
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
21
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
-
};
|
|
24
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
26
|
exports.mergeExtensionTranslations = exports.getAllTranslationFiles = void 0;
|
|
26
27
|
const fs = __importStar(require("fs-extra"));
|
|
27
|
-
const glob_1 =
|
|
28
|
+
const glob_1 = require("glob");
|
|
28
29
|
const path = __importStar(require("path"));
|
|
29
30
|
const utils_1 = require("./utils");
|
|
30
31
|
/**
|
|
@@ -42,7 +43,7 @@ function getAllTranslationFiles(extensions) {
|
|
|
42
43
|
allTranslationsWithGlobs[code] = [globPattern];
|
|
43
44
|
}
|
|
44
45
|
else {
|
|
45
|
-
//
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
46
47
|
allTranslationsWithGlobs[code].push(globPattern);
|
|
47
48
|
}
|
|
48
49
|
}
|
|
@@ -56,8 +57,8 @@ function getAllTranslationFiles(extensions) {
|
|
|
56
57
|
continue;
|
|
57
58
|
}
|
|
58
59
|
for (const pattern of globs) {
|
|
59
|
-
const files = glob_1.
|
|
60
|
-
//
|
|
60
|
+
const files = (0, glob_1.globSync)(pattern);
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
61
62
|
allTranslationsWithFiles[code].push(...files);
|
|
62
63
|
}
|
|
63
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.js","sourceRoot":"","sources":["../src/compiler/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.js","sourceRoot":"","sources":["../src/compiler/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAA+B;AAC/B,+BAAgC;AAChC,2CAA6B;AAG7B,mCAAiC;AAEjC;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,UAAkC;IAGrE,sCAAsC;IACtC,MAAM,wBAAwB,GAAkD,EAAE,CAAC;IACnF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAChC,KAAK,MAAM,CAAC,YAAY,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,YAAY,IAAI,EAAE,CAAC,EAAE;YACpF,MAAM,IAAI,GAAG,YAA4B,CAAC;YAC1C,IAAI,WAAW,EAAE;gBACb,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE;oBACjC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,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,CAAC;IAClD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC5B,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;aACrD,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAChD,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACrE,MAAM,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC;KAClC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;;GAGG;AACH,SAAS,iBAAiB,CAAC,EAAgB,EAAE,EAAgB;IACzD,MAAM,MAAM,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;IACzB,KAAK,MAAM,CAAC,OAAO,EAAE,YAAY,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;QACtD,MAAM,CAAC,OAAO,CAAC,GAAG;YACd,GAAG,EAAE,CAAC,OAAO,CAAC;YACd,GAAG,YAAY;SAClB,CAAC;KACL;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
package/compiler/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LanguageCode } from '@vendure/common/lib/generated-types';
|
|
2
|
-
export
|
|
2
|
+
export type Extension = AdminUiExtension | TranslationExtension | StaticAssetExtension | GlobalStylesExtension | SassVariableOverridesExtension;
|
|
3
3
|
/**
|
|
4
4
|
* @description
|
|
5
5
|
* Defines extensions to the Admin UI translations. Can be used as a stand-alone extension definition which only adds translations
|
|
@@ -105,6 +105,103 @@ export interface AdminUiExtension extends Partial<TranslationExtension>, Partial
|
|
|
105
105
|
* One or more Angular modules which extend the default Admin UI.
|
|
106
106
|
*/
|
|
107
107
|
ngModules: Array<AdminUiExtensionSharedModule | AdminUiExtensionLazyModule>;
|
|
108
|
+
/**
|
|
109
|
+
* @description
|
|
110
|
+
* An optional alias for the module so it can be referenced by other UI extension modules.
|
|
111
|
+
*
|
|
112
|
+
* By default, Angular modules declared in an AdminUiExtension do not have access to code outside the directory
|
|
113
|
+
* defined by the `extensionPath`. A scenario in which that can be useful though is in a monorepo codebase where
|
|
114
|
+
* a common NgModule is shared across different plugins, each defined in its own package. An example can be found
|
|
115
|
+
* below - note that the main `tsconfig.json` also maps the target module but using a path relative to the project's
|
|
116
|
+
* root folder. The UI module is not part of the main TypeScript build task as explained in
|
|
117
|
+
* [Extending the Admin UI](https://www.vendure.io/docs/plugins/extending-the-admin-ui/) but having `paths`
|
|
118
|
+
* properly configured helps with usual IDE code editing features such as code completion and quick navigation, as
|
|
119
|
+
* well as linting.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* // packages/common-ui-module/src/ui/ui-shared.module.ts
|
|
124
|
+
* import { NgModule } from '\@angular/core';
|
|
125
|
+
* import { SharedModule } from '\@vendure/admin-ui/core';
|
|
126
|
+
* import { CommonUiComponent } from './components/common-ui/common-ui.component';
|
|
127
|
+
*
|
|
128
|
+
* export { CommonUiComponent };
|
|
129
|
+
*
|
|
130
|
+
* \@NgModule({
|
|
131
|
+
* imports: [SharedModule],
|
|
132
|
+
* exports: [CommonUiComponent],
|
|
133
|
+
* declarations: [CommonUiComponent],
|
|
134
|
+
* })
|
|
135
|
+
* export class CommonSharedUiModule {}
|
|
136
|
+
* ```
|
|
137
|
+
*
|
|
138
|
+
* ```ts
|
|
139
|
+
* // packages/common-ui-module/src/index.ts
|
|
140
|
+
* import path from 'path';
|
|
141
|
+
*
|
|
142
|
+
* import { AdminUiExtension } from '\@vendure/ui-devkit/compiler';
|
|
143
|
+
*
|
|
144
|
+
* export const uiExtensions: AdminUiExtension = {
|
|
145
|
+
* pathAlias: '\@common-ui-module', // this is the important part
|
|
146
|
+
* extensionPath: path.join(__dirname, 'ui'),
|
|
147
|
+
* ngModules: [
|
|
148
|
+
* {
|
|
149
|
+
* type: 'shared' as const,
|
|
150
|
+
* ngModuleFileName: 'ui-shared.module.ts',
|
|
151
|
+
* ngModuleName: 'CommonSharedUiModule',
|
|
152
|
+
* },
|
|
153
|
+
* ],
|
|
154
|
+
* };
|
|
155
|
+
* ```
|
|
156
|
+
*
|
|
157
|
+
* ```json
|
|
158
|
+
* // tsconfig.json
|
|
159
|
+
* {
|
|
160
|
+
* "compilerOptions": {
|
|
161
|
+
* "baseUrl": ".",
|
|
162
|
+
* "paths": {
|
|
163
|
+
* "\@common-ui-module/*": ["packages/common-ui-module/src/ui/*"]
|
|
164
|
+
* }
|
|
165
|
+
* }
|
|
166
|
+
* }
|
|
167
|
+
* ```
|
|
168
|
+
*
|
|
169
|
+
* ```ts
|
|
170
|
+
* // packages/sample-plugin/src/ui/ui-extension.module.ts
|
|
171
|
+
* import { NgModule } from '\@angular/core';
|
|
172
|
+
* import { SharedModule } from '\@vendure/admin-ui/core';
|
|
173
|
+
* // the import below works both in the context of the custom Admin UI app as well as the main project
|
|
174
|
+
* // '\@common-ui-module' is the value of "pathAlias" and 'ui-shared.module' is the file we want to reference inside "extensionPath"
|
|
175
|
+
* import { CommonSharedUiModule, CommonUiComponent } from '\@common-ui-module/ui-shared.module';
|
|
176
|
+
*
|
|
177
|
+
* \@NgModule({
|
|
178
|
+
* imports: [
|
|
179
|
+
* SharedModule,
|
|
180
|
+
* CommonSharedUiModule,
|
|
181
|
+
* RouterModule.forChild([
|
|
182
|
+
* {
|
|
183
|
+
* path: '',
|
|
184
|
+
* pathMatch: 'full',
|
|
185
|
+
* component: CommonUiComponent,
|
|
186
|
+
* },
|
|
187
|
+
* ]),
|
|
188
|
+
* ],
|
|
189
|
+
* })
|
|
190
|
+
* export class SampleUiExtensionModule {}
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
pathAlias?: string;
|
|
194
|
+
/**
|
|
195
|
+
* @description
|
|
196
|
+
* Optional array specifying filenames or [glob](https://github.com/isaacs/node-glob) patterns that should
|
|
197
|
+
* be skipped when copying the directory defined by `extensionPath`.
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* ```ts
|
|
201
|
+
* exclude: ['**\/*.spec.ts']
|
|
202
|
+
* ```
|
|
203
|
+
*/
|
|
204
|
+
exclude?: string[];
|
|
108
205
|
}
|
|
109
206
|
/**
|
|
110
207
|
* @description
|
|
@@ -114,7 +211,7 @@ export interface AdminUiExtension extends Partial<TranslationExtension>, Partial
|
|
|
114
211
|
* @docsCategory UiDevkit
|
|
115
212
|
* @docsPage AdminUiExtension
|
|
116
213
|
*/
|
|
117
|
-
export
|
|
214
|
+
export type StaticAssetDefinition = string | {
|
|
118
215
|
path: string;
|
|
119
216
|
rename: string;
|
|
120
217
|
};
|
|
@@ -182,7 +279,7 @@ export interface AdminUiExtensionLazyModule {
|
|
|
182
279
|
*
|
|
183
280
|
* @docsCategory UiDevkit
|
|
184
281
|
*/
|
|
185
|
-
export
|
|
282
|
+
export type UiExtensionCompilerProcessArgument = string | [string, any];
|
|
186
283
|
/**
|
|
187
284
|
* @description
|
|
188
285
|
* Options to configure how the Admin UI should be compiled.
|
|
@@ -251,7 +348,7 @@ export interface UiExtensionCompilerOptions {
|
|
|
251
348
|
*/
|
|
252
349
|
additionalProcessArguments?: UiExtensionCompilerProcessArgument[];
|
|
253
350
|
}
|
|
254
|
-
export
|
|
351
|
+
export type Translations = {
|
|
255
352
|
[section: string]: {
|
|
256
353
|
[token: string]: string;
|
|
257
354
|
};
|
|
@@ -261,3 +358,6 @@ export interface BrandingOptions {
|
|
|
261
358
|
largeLogoPath?: string;
|
|
262
359
|
faviconPath?: string;
|
|
263
360
|
}
|
|
361
|
+
export interface AdminUiExtensionWithId extends AdminUiExtension {
|
|
362
|
+
id: string;
|
|
363
|
+
}
|
package/compiler/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdminUiExtension, Extension, GlobalStylesExtension, SassVariableOverridesExtension, StaticAssetDefinition, StaticAssetExtension, TranslationExtension } from './types';
|
|
1
|
+
import { AdminUiExtension, AdminUiExtensionWithId, Extension, GlobalStylesExtension, SassVariableOverridesExtension, StaticAssetDefinition, StaticAssetExtension, TranslationExtension } from './types';
|
|
2
2
|
export declare const logger: {
|
|
3
3
|
log: (message: string) => void;
|
|
4
4
|
error: (message: string) => void;
|
|
@@ -26,7 +26,7 @@ export declare function copyStaticAsset(outputPath: string, staticAssetDef: Stat
|
|
|
26
26
|
* If not defined by the user, a deterministic ID is generated
|
|
27
27
|
* from a hash of the extension config.
|
|
28
28
|
*/
|
|
29
|
-
export declare function normalizeExtensions(extensions?: AdminUiExtension[]):
|
|
29
|
+
export declare function normalizeExtensions(extensions?: AdminUiExtension[]): AdminUiExtensionWithId[];
|
|
30
30
|
export declare function isAdminUiExtension(input: Extension): input is AdminUiExtension;
|
|
31
31
|
export declare function isTranslationExtension(input: Extension): input is TranslationExtension;
|
|
32
32
|
export declare function isStaticAssetExtension(input: Extension): input is StaticAssetExtension;
|
package/compiler/utils.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -23,7 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
27
|
};
|
|
24
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
29
|
exports.isSassVariableOverridesExtension = exports.isGlobalStylesExtension = exports.isStaticAssetExtension = exports.isTranslationExtension = exports.isAdminUiExtension = exports.normalizeExtensions = exports.copyStaticAsset = exports.copyUiDevkit = exports.getStaticAssetPath = exports.shouldUseYarn = exports.logger = void 0;
|
|
26
|
-
/*
|
|
30
|
+
/* eslint-disable no-console */
|
|
27
31
|
const chalk_1 = __importDefault(require("chalk"));
|
|
28
32
|
const child_process_1 = require("child_process");
|
|
29
33
|
const crypto_1 = require("crypto");
|
|
@@ -39,7 +43,7 @@ exports.logger = {
|
|
|
39
43
|
*/
|
|
40
44
|
function shouldUseYarn() {
|
|
41
45
|
try {
|
|
42
|
-
child_process_1.execSync('yarnpkg --version', { stdio: 'ignore' });
|
|
46
|
+
(0, child_process_1.execSync)('yarnpkg --version', { stdio: 'ignore' });
|
|
43
47
|
return true;
|
|
44
48
|
}
|
|
45
49
|
catch (e) {
|
|
@@ -70,9 +74,8 @@ exports.copyUiDevkit = copyUiDevkit;
|
|
|
70
74
|
*/
|
|
71
75
|
async function copyStaticAsset(outputPath, staticAssetDef) {
|
|
72
76
|
const staticAssetPath = getStaticAssetPath(staticAssetDef);
|
|
73
|
-
let assetOutputPath;
|
|
74
77
|
const assetBasename = path.basename(staticAssetPath);
|
|
75
|
-
assetOutputPath = path.join(outputPath, constants_1.STATIC_ASSETS_OUTPUT_DIR, assetBasename);
|
|
78
|
+
const assetOutputPath = path.join(outputPath, constants_1.STATIC_ASSETS_OUTPUT_DIR, assetBasename);
|
|
76
79
|
fs.copySync(staticAssetPath, assetOutputPath);
|
|
77
80
|
if (typeof staticAssetDef !== 'string') {
|
|
78
81
|
// The asset is being renamed
|
|
@@ -98,7 +101,7 @@ function normalizeExtensions(extensions) {
|
|
|
98
101
|
return (extensions || []).map(e => {
|
|
99
102
|
let id = e.id;
|
|
100
103
|
if (!id) {
|
|
101
|
-
const hash = crypto_1.createHash('sha256');
|
|
104
|
+
const hash = (0, crypto_1.createHash)('sha256');
|
|
102
105
|
hash.update(JSON.stringify(e));
|
|
103
106
|
id = hash.digest('hex');
|
|
104
107
|
}
|
package/compiler/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/compiler/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/compiler/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA+B;AAC/B,kDAA0B;AAC1B,iDAAyC;AACzC,mCAAoC;AACpC,6CAA+B;AAC/B,2CAA6B;AAE7B,2CAAuD;AAY1C,QAAA,MAAM,GAAG;IAClB,GAAG,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3D,KAAK,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;CAC9D,CAAC;AAEF;;GAEG;AACH,SAAgB,aAAa;IACzB,IAAI;QACA,IAAA,wBAAQ,EAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QACnD,OAAO,IAAI,CAAC;KACf;IAAC,OAAO,CAAM,EAAE;QACb,OAAO,KAAK,CAAC;KAChB;AACL,CAAC;AAPD,sCAOC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAAC,cAAqC;IACpE,OAAO,OAAO,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,IA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|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"gitHead": "3d031edfff37581b44848ece021acbb7a472f43f"
|
|
2
|
+
"name": "@vendure/ui-devkit",
|
|
3
|
+
"version": "2.0.0-beta.0",
|
|
4
|
+
"description": "A library for authoring Vendure Admin UI extensions",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"vendure",
|
|
7
|
+
"javascript",
|
|
8
|
+
"extensions"
|
|
9
|
+
],
|
|
10
|
+
"author": "Michael Bromley <michael@michaelbromley.co.uk>",
|
|
11
|
+
"homepage": "https://www.vendure.io/",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"files": [
|
|
14
|
+
"client",
|
|
15
|
+
"compiler",
|
|
16
|
+
"scaffold"
|
|
17
|
+
],
|
|
18
|
+
"funding": "https://github.com/sponsors/michaelbromley",
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"main": "client/index.js",
|
|
23
|
+
"types": "client/index.d.ts",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/vendure-ecommerce/vendure.git"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build:client": "rimraf ./client && rollup -c rollup.config.mjs --configProduction",
|
|
30
|
+
"build:compiler": "rimraf ./compiler && tsc -p tsconfig.compiler.json",
|
|
31
|
+
"build": "yarn build:client && yarn build:compiler",
|
|
32
|
+
"watch": "rimraf ./lib && rollup -c rollup.config.mjs -w",
|
|
33
|
+
"lint": "eslint --fix ."
|
|
34
|
+
},
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/vendure-ecommerce/vendure/issues"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@angular-devkit/build-angular": "^15.2.1",
|
|
40
|
+
"@angular/cli": "^15.2.1",
|
|
41
|
+
"@angular/compiler": "^15.2.1",
|
|
42
|
+
"@angular/compiler-cli": "^15.2.1",
|
|
43
|
+
"@vendure/admin-ui": "^2.0.0-beta.0",
|
|
44
|
+
"@vendure/common": "^2.0.0-beta.0",
|
|
45
|
+
"chalk": "^4.1.0",
|
|
46
|
+
"chokidar": "^3.5.1",
|
|
47
|
+
"fs-extra": "^10.0.0",
|
|
48
|
+
"glob": "^9.2.1",
|
|
49
|
+
"rxjs": "^7.5.4"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
53
|
+
"@types/fs-extra": "^11.0.1",
|
|
54
|
+
"@vendure/core": "^2.0.0-beta.0",
|
|
55
|
+
"rimraf": "^3.0.2",
|
|
56
|
+
"rollup": "^3.18.0",
|
|
57
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
58
|
+
"rollup-plugin-typescript2": "^0.34.1",
|
|
59
|
+
"tslib": "^2.5.0",
|
|
60
|
+
"typescript": "4.9.5"
|
|
61
|
+
},
|
|
62
|
+
"gitHead": "041394503af30fbfcf98905e1a7ed0d58a30232f"
|
|
64
63
|
}
|
package/scaffold/angular.json
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
}
|
|
47
47
|
],
|
|
48
48
|
"styles": [
|
|
49
|
-
"src/global-styles.scss"
|
|
49
|
+
"src/styles/global-styles.scss"
|
|
50
50
|
],
|
|
51
51
|
"stylePreprocessorOptions": {
|
|
52
52
|
"includePaths": [
|
|
@@ -57,8 +57,19 @@
|
|
|
57
57
|
"graphql-tag",
|
|
58
58
|
"zen-observable",
|
|
59
59
|
"lodash",
|
|
60
|
+
"dayjs",
|
|
60
61
|
"apollo-upload-client",
|
|
61
|
-
"@
|
|
62
|
+
"@clr/icons",
|
|
63
|
+
"@clr/icons/shapes/all-shapes",
|
|
64
|
+
"@vendure/common/lib/generated-types",
|
|
65
|
+
"@vendure/common/lib/simple-deep-clone",
|
|
66
|
+
"@vendure/common/lib/shared-constants",
|
|
67
|
+
"@vendure/common/lib/shared-utils",
|
|
68
|
+
"@vendure/common/lib/normalize-string",
|
|
69
|
+
"@vendure/common/lib/unique",
|
|
70
|
+
"@vendure/common/lib/omit",
|
|
71
|
+
"@vendure/common/lib/pick",
|
|
72
|
+
"@messageformat/core"
|
|
62
73
|
],
|
|
63
74
|
"vendorChunk": true,
|
|
64
75
|
"extractLicenses": false,
|
|
@@ -87,7 +98,6 @@
|
|
|
87
98
|
}
|
|
88
99
|
},
|
|
89
100
|
"outputHashing": "all",
|
|
90
|
-
"extractCss": true,
|
|
91
101
|
"namedChunks": false,
|
|
92
102
|
"extractLicenses": true,
|
|
93
103
|
"vendorChunk": false
|
package/scaffold/src/main.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "./styles";
|
package/scaffold/tsconfig.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"baseUrl": "./",
|
|
5
5
|
"importHelpers": true,
|
|
6
|
-
"module": "
|
|
6
|
+
"module": "es2020",
|
|
7
7
|
"outDir": "./dist/out-tsc",
|
|
8
8
|
"sourceMap": true,
|
|
9
9
|
"declaration": false,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"strict": true,
|
|
13
13
|
"noImplicitAny": false,
|
|
14
14
|
"strictPropertyInitialization": false,
|
|
15
|
-
"target": "
|
|
15
|
+
"target": "ES2022",
|
|
16
16
|
"skipLibCheck": true,
|
|
17
17
|
"esModuleInterop": true,
|
|
18
18
|
"allowSyntheticDefaultImports": true,
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"es2019",
|
|
22
22
|
"dom",
|
|
23
23
|
"esnext.asynciterable"
|
|
24
|
-
]
|
|
24
|
+
],
|
|
25
|
+
"useDefineForClassFields": false
|
|
25
26
|
}
|
|
26
27
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import "./styles/styles";
|