@ikas/storefront-next 6.1.0-beta.339 → 6.1.0-beta.340
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from"../../../ext/tslib/tslib.es6.js";import n from"path";import{deleteDirContent as r,createFile as a}from"../../../utils/fs.js";import{PAGE_INFO as o,CHECKOUT_PAGE_CONTENT as s,CHECKOUT_DETAIL_PAGE_CONTENT as c,EDITOR_PAGE_CONTENT as i}from"./info.js";var
|
|
1
|
+
import{__awaiter as e,__generator as t}from"../../../ext/tslib/tslib.es6.js";import n from"path";import{deleteDirContent as r,createFile as a}from"../../../utils/fs.js";import{PAGE_INFO as o,CHECKOUT_PAGE_CONTENT as s,CHECKOUT_DETAIL_PAGE_CONTENT as c,EDITOR_PAGE_CONTENT as i}from"./info.js";var u=function(){function u(){}return u.generate=function(a){return e(this,void 0,void 0,(function(){var e,s,c,i,p,f,g,l,m,h,d,P,C,_,E;return t(this,(function(t){switch(t.label){case 0:return e=n.join(a||process.cwd(),"src","pages"),[4,r(e,["_app.tsx","_document.tsx","api"])];case 1:t.sent(),s=!0,c=0,i=o,t.label=2;case 2:return c<i.length?(p=i[c],(f=s)?[4,u.generatePageWithInfo(p,a)]:[3,4]):[3,6];case 3:f=t.sent(),t.label=4;case 4:s=f,t.label=5;case 5:return c++,[3,2];case 6:return g=o.find((function(e){return e.isCheckout})),l=o.find((function(e){return e.isCheckoutDetail})),m=o.find((function(e){return e.isEditor})),g?[4,u.generatePageWithInfo(g,a)]:[3,8];case 7:return d=t.sent(),[3,9];case 8:d=!1,t.label=9;case 9:return h=d,l?[4,u.generatePageWithInfo(l,a)]:[3,11];case 10:return C=t.sent(),[3,12];case 11:C=!1,t.label=12;case 12:return P=C,m?[4,u.generatePageWithInfo(m,a)]:[3,14];case 13:return E=t.sent(),[3,15];case 14:E=!1,t.label=15;case 15:return _=E,[2,s&&h&&P&&_]}}))}))},u.generatePageWithInfo=function(r,o){return e(this,void 0,void 0,(function(){var e,u,p,f,g,l,m,h,d;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e="",r.isCheckout?e=s:r.isCheckoutDetail?e=c:r.isEditor?e=i:(u=r.pageComponentName+"Next",p="import { ".concat(r.pageComponentName,' } from "@ikas/storefront";\r\n'),f="import { ".concat(r.pageComponentName," as ").concat(u,' } from "@ikas/storefront-next";\r\n'),g='import Components from "src/components/__generated__/pages/'.concat(r.path.replace(".tsx",""),'";\r\n'),l="\nconst PageComponent = ".concat(r.pageComponentName,".default;\n\nconst Page = (props: any) => {\n return <PageComponent components={Components} {...props} />;\n};\n\nexport default Page;\r\n"),m=r.isDynamicSSG?"export const getStaticPaths = ".concat(u,".getStaticPaths;\r\n"):"",h=r.isSSR?"export const getServerSideProps = ".concat(u,".getServerSideProps;\r\n"):"export const getStaticProps = ".concat(u,".getStaticProps;\r\n"),e=p+f+g+l+m+h),[4,a(n.join(o||process.cwd(),"src","pages"),r.path,e)];case 1:return[2,t.sent()];case 2:return d=t.sent(),console.error(d),[2,!1];case 3:return[2]}}))}))},u.generatePageWithType=function(n){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return(e=o.find((function(e){return e.pageTypes.includes(n)})))?[4,u.generatePageWithInfo(e)]:[3,2];case 1:return[2,t.sent()];case 2:return[2,!1]}}))}))},u}();export{u as PageGenerator};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-next",
|
|
3
|
-
"version": "6.1.0-beta.
|
|
3
|
+
"version": "6.1.0-beta.340",
|
|
4
4
|
"description": "Next.js specific functions for ikas storefront themes.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -17,23 +17,23 @@
|
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"next": "12.2.0",
|
|
20
|
-
"@ikas/storefront-config": "^6.1.0-beta.
|
|
21
|
-
"@ikas/storefront-providers": "^6.1.0-beta.
|
|
22
|
-
"@ikas/storefront-models": "^6.1.0-beta.
|
|
23
|
-
"@ikas/storefront-api": "^6.1.0-beta.
|
|
24
|
-
"@ikas/storefront-assets": "^6.1.0-beta.
|
|
20
|
+
"@ikas/storefront-config": "^6.1.0-beta.340",
|
|
21
|
+
"@ikas/storefront-providers": "^6.1.0-beta.340",
|
|
22
|
+
"@ikas/storefront-models": "^6.1.0-beta.340",
|
|
23
|
+
"@ikas/storefront-api": "^6.1.0-beta.340",
|
|
24
|
+
"@ikas/storefront-assets": "^6.1.0-beta.340",
|
|
25
25
|
"axios": "^0.26.0",
|
|
26
26
|
"lodash": "^4.17.21",
|
|
27
27
|
"cors": "^2.8.5",
|
|
28
28
|
"adm-zip": "^0.5.9"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@ikas/storefront-cmd": "^6.1.0-beta.
|
|
32
|
-
"@ikas/storefront-config": "^6.1.0-beta.
|
|
33
|
-
"@ikas/storefront-providers": "^6.1.0-beta.
|
|
34
|
-
"@ikas/storefront-models": "^6.1.0-beta.
|
|
35
|
-
"@ikas/storefront-api": "^6.1.0-beta.
|
|
36
|
-
"@ikas/storefront-assets": "^6.1.0-beta.
|
|
31
|
+
"@ikas/storefront-cmd": "^6.1.0-beta.340",
|
|
32
|
+
"@ikas/storefront-config": "^6.1.0-beta.340",
|
|
33
|
+
"@ikas/storefront-providers": "^6.1.0-beta.340",
|
|
34
|
+
"@ikas/storefront-models": "^6.1.0-beta.340",
|
|
35
|
+
"@ikas/storefront-api": "^6.1.0-beta.340",
|
|
36
|
+
"@ikas/storefront-assets": "^6.1.0-beta.340",
|
|
37
37
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
38
38
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
39
39
|
"@rollup/plugin-json": "^4.1.0",
|