@webiny/wcp 5.35.0-beta.1 → 5.35.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/encryption.js CHANGED
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.encrypt = exports.decrypt = void 0;
7
-
8
7
  /**
9
8
  * For now, we're not doing actual encryption, just simple base64 encoding/decoding.
10
9
  * Potentially, we'll revisit this in the future and implement actual encryption.
11
10
  */
11
+
12
12
  const encrypt = rawObject => {
13
13
  try {
14
14
  return Buffer.from(JSON.stringify(rawObject), "utf-8").toString("base64");
@@ -16,9 +16,7 @@ const encrypt = rawObject => {
16
16
  throw new Error("Could not encrypt given data.");
17
17
  }
18
18
  };
19
-
20
19
  exports.encrypt = encrypt;
21
-
22
20
  const decrypt = encryptedString => {
23
21
  try {
24
22
  const decryptedString = Buffer.from(encryptedString, "base64").toString("utf-8");
@@ -27,5 +25,4 @@ const decrypt = encryptedString => {
27
25
  throw new Error(`Could not decrypt the given string (${encryptedString}).`);
28
26
  }
29
27
  };
30
-
31
28
  exports.decrypt = decrypt;
package/encryption.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["encrypt","rawObject","Buffer","from","JSON","stringify","toString","Error","decrypt","encryptedString","decryptedString","parse"],"sources":["encryption.ts"],"sourcesContent":["/**\n * For now, we're not doing actual encryption, just simple base64 encoding/decoding.\n * Potentially, we'll revisit this in the future and implement actual encryption.\n */\n\nexport const encrypt = <T = Record<string, any>>(rawObject: T): string => {\n try {\n return Buffer.from(JSON.stringify(rawObject), \"utf-8\").toString(\"base64\");\n } catch {\n throw new Error(\"Could not encrypt given data.\");\n }\n};\n\nexport const decrypt = <T = Record<string, any>>(encryptedString: string): T => {\n try {\n const decryptedString = Buffer.from(encryptedString, \"base64\").toString(\"utf-8\");\n return JSON.parse(decryptedString) as T;\n } catch {\n throw new Error(`Could not decrypt the given string (${encryptedString}).`);\n }\n};\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AAEO,MAAMA,OAAO,GAA6BC,SAA1B,IAAmD;EACtE,IAAI;IACA,OAAOC,MAAM,CAACC,IAAP,CAAYC,IAAI,CAACC,SAAL,CAAeJ,SAAf,CAAZ,EAAuC,OAAvC,EAAgDK,QAAhD,CAAyD,QAAzD,CAAP;EACH,CAFD,CAEE,MAAM;IACJ,MAAM,IAAIC,KAAJ,CAAU,+BAAV,CAAN;EACH;AACJ,CANM;;;;AAQA,MAAMC,OAAO,GAA6BC,eAA1B,IAAyD;EAC5E,IAAI;IACA,MAAMC,eAAe,GAAGR,MAAM,CAACC,IAAP,CAAYM,eAAZ,EAA6B,QAA7B,EAAuCH,QAAvC,CAAgD,OAAhD,CAAxB;IACA,OAAOF,IAAI,CAACO,KAAL,CAAWD,eAAX,CAAP;EACH,CAHD,CAGE,MAAM;IACJ,MAAM,IAAIH,KAAJ,CAAW,uCAAsCE,eAAgB,IAAjE,CAAN;EACH;AACJ,CAPM"}
1
+ {"version":3,"names":["encrypt","rawObject","Buffer","from","JSON","stringify","toString","Error","decrypt","encryptedString","decryptedString","parse"],"sources":["encryption.ts"],"sourcesContent":["/**\n * For now, we're not doing actual encryption, just simple base64 encoding/decoding.\n * Potentially, we'll revisit this in the future and implement actual encryption.\n */\n\nexport const encrypt = <T = Record<string, any>>(rawObject: T): string => {\n try {\n return Buffer.from(JSON.stringify(rawObject), \"utf-8\").toString(\"base64\");\n } catch {\n throw new Error(\"Could not encrypt given data.\");\n }\n};\n\nexport const decrypt = <T = Record<string, any>>(encryptedString: string): T => {\n try {\n const decryptedString = Buffer.from(encryptedString, \"base64\").toString(\"utf-8\");\n return JSON.parse(decryptedString) as T;\n } catch {\n throw new Error(`Could not decrypt the given string (${encryptedString}).`);\n }\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;;AAEO,MAAMA,OAAO,GAA6BC,SAAY,IAAa;EACtE,IAAI;IACA,OAAOC,MAAM,CAACC,IAAI,CAACC,IAAI,CAACC,SAAS,CAACJ,SAAS,CAAC,EAAE,OAAO,CAAC,CAACK,QAAQ,CAAC,QAAQ,CAAC;EAC7E,CAAC,CAAC,MAAM;IACJ,MAAM,IAAIC,KAAK,CAAC,+BAA+B,CAAC;EACpD;AACJ,CAAC;AAAC;AAEK,MAAMC,OAAO,GAA6BC,eAAuB,IAAQ;EAC5E,IAAI;IACA,MAAMC,eAAe,GAAGR,MAAM,CAACC,IAAI,CAACM,eAAe,EAAE,QAAQ,CAAC,CAACH,QAAQ,CAAC,OAAO,CAAC;IAChF,OAAOF,IAAI,CAACO,KAAK,CAACD,eAAe,CAAC;EACtC,CAAC,CAAC,MAAM;IACJ,MAAM,IAAIH,KAAK,CAAE,uCAAsCE,eAAgB,IAAG,CAAC;EAC/E;AACJ,CAAC;AAAC"}
package/index.js CHANGED
@@ -7,9 +7,7 @@ var _exportNames = {
7
7
  WCP_FEATURE_LABEL: true
8
8
  };
9
9
  exports.WCP_FEATURE_LABEL = void 0;
10
-
11
10
  var _encryption = require("./encryption");
12
-
13
11
  Object.keys(_encryption).forEach(function (key) {
14
12
  if (key === "default" || key === "__esModule") return;
15
13
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -21,9 +19,7 @@ Object.keys(_encryption).forEach(function (key) {
21
19
  }
22
20
  });
23
21
  });
24
-
25
22
  var _licenses = require("./licenses");
26
-
27
23
  Object.keys(_licenses).forEach(function (key) {
28
24
  if (key === "default" || key === "__esModule") return;
29
25
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
@@ -35,9 +31,7 @@ Object.keys(_licenses).forEach(function (key) {
35
31
  }
36
32
  });
37
33
  });
38
-
39
34
  var _urls = require("./urls");
40
-
41
35
  Object.keys(_urls).forEach(function (key) {
42
36
  if (key === "default" || key === "__esModule") return;
43
37
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["WCP_FEATURE_LABEL","seats","multiTenancy","advancedPublishingWorkflow","advancedAccessControlLayer"],"sources":["index.ts"],"sourcesContent":["export * from \"./encryption\";\nexport * from \"./licenses\";\nexport * from \"./urls\";\n\nexport const WCP_FEATURE_LABEL = {\n seats: \"User Seats\",\n multiTenancy: \"Multi-tenancy\",\n advancedPublishingWorkflow: \"Advanced Publishing Workflow (APW)\",\n advancedAccessControlLayer: \"Advanced Access Control Layer (ACL)\"\n};\n"],"mappings":";;;;;;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAEO,MAAMA,iBAAiB,GAAG;EAC7BC,KAAK,EAAE,YADsB;EAE7BC,YAAY,EAAE,eAFe;EAG7BC,0BAA0B,EAAE,oCAHC;EAI7BC,0BAA0B,EAAE;AAJC,CAA1B"}
1
+ {"version":3,"names":["WCP_FEATURE_LABEL","seats","multiTenancy","advancedPublishingWorkflow","advancedAccessControlLayer"],"sources":["index.ts"],"sourcesContent":["export * from \"./encryption\";\nexport * from \"./licenses\";\nexport * from \"./urls\";\n\nexport const WCP_FEATURE_LABEL = {\n seats: \"User Seats\",\n multiTenancy: \"Multi-tenancy\",\n advancedPublishingWorkflow: \"Advanced Publishing Workflow (APW)\",\n advancedAccessControlLayer: \"Advanced Access Control Layer (ACL)\"\n};\n"],"mappings":";;;;;;;;;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAEO,MAAMA,iBAAiB,GAAG;EAC7BC,KAAK,EAAE,YAAY;EACnBC,YAAY,EAAE,eAAe;EAC7BC,0BAA0B,EAAE,oCAAoC;EAChEC,0BAA0B,EAAE;AAChC,CAAC;AAAC"}
package/licenses.js CHANGED
@@ -1,18 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.getWcpProjectLicense = void 0;
9
-
10
8
  var _nodeFetch = _interopRequireDefault(require("node-fetch"));
11
-
12
9
  var _encryption = require("./encryption");
13
-
14
10
  var _urls = require("./urls");
15
-
16
11
  const fetchWcpProjectLicense = async ({
17
12
  orgId,
18
13
  projectId,
@@ -30,22 +25,17 @@ const fetchWcpProjectLicense = async ({
30
25
  });
31
26
  return encryptedLicense;
32
27
  };
33
-
34
28
  const getWcpProjectLicense = async params => {
35
29
  let encryptedLicense = process.env.WCP_PROJECT_LICENSE;
36
-
37
30
  if (!encryptedLicense) {
38
31
  const fetchedLicense = await fetchWcpProjectLicense(params);
39
-
40
32
  if (fetchedLicense) {
41
33
  encryptedLicense = fetchedLicense.license;
42
34
  }
43
35
  }
44
-
45
36
  if (!encryptedLicense) {
46
37
  return null;
47
38
  }
48
-
49
39
  try {
50
40
  return (0, _encryption.decrypt)(encryptedLicense);
51
41
  } catch (e) {
@@ -54,5 +44,4 @@ const getWcpProjectLicense = async params => {
54
44
  return null;
55
45
  }
56
46
  };
57
-
58
47
  exports.getWcpProjectLicense = getWcpProjectLicense;
package/licenses.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["fetchWcpProjectLicense","orgId","projectId","projectEnvironmentApiKey","getLicenseEndpoint","getWcpApiUrl","encryptedLicense","fetch","headers","authorization","then","response","json","catch","e","console","warn","message","getWcpProjectLicense","params","process","env","WCP_PROJECT_LICENSE","fetchedLicense","license","decrypt"],"sources":["licenses.ts"],"sourcesContent":["import fetch from \"node-fetch\";\nimport { DecryptedWcpProjectLicense, EncryptedWcpProjectLicense } from \"./types\";\nimport { decrypt } from \"./encryption\";\nimport { getWcpApiUrl } from \"./urls\";\n\ninterface GetWcpProjectLicenseParams {\n orgId: string;\n projectId: string;\n projectEnvironmentApiKey: string;\n}\n\nconst fetchWcpProjectLicense = async ({\n orgId,\n projectId,\n projectEnvironmentApiKey\n}: GetWcpProjectLicenseParams) => {\n // Fetch and decrypt the license.\n const getLicenseEndpoint = getWcpApiUrl(`/orgs/${orgId}/projects/${projectId}/license`);\n\n const encryptedLicense: { license: EncryptedWcpProjectLicense } | null = await fetch(\n getLicenseEndpoint,\n {\n headers: { authorization: projectEnvironmentApiKey }\n }\n )\n .then(response => response.json())\n .catch(e => {\n console.warn(\n `An error occurred while trying to retrieve the license for project \"${orgId}/${projectId}\": ${e.message}`\n );\n return null;\n });\n\n return encryptedLicense;\n};\n\nexport const getWcpProjectLicense = async (params: GetWcpProjectLicenseParams) => {\n let encryptedLicense = process.env.WCP_PROJECT_LICENSE;\n if (!encryptedLicense) {\n const fetchedLicense = await fetchWcpProjectLicense(params);\n if (fetchedLicense) {\n encryptedLicense = fetchedLicense.license;\n }\n }\n\n if (!encryptedLicense) {\n return null;\n }\n\n try {\n return decrypt<DecryptedWcpProjectLicense>(encryptedLicense);\n } catch (e) {\n const projectId = `${params.orgId}/${params.projectId}`;\n console.warn(\n `An error occurred while trying to decrypt the retrieved license for project \"${projectId}\": ${e.message}`\n );\n return null;\n }\n};\n"],"mappings":";;;;;;;;;AAAA;;AAEA;;AACA;;AAQA,MAAMA,sBAAsB,GAAG,OAAO;EAClCC,KADkC;EAElCC,SAFkC;EAGlCC;AAHkC,CAAP,KAIG;EAC9B;EACA,MAAMC,kBAAkB,GAAG,IAAAC,kBAAA,EAAc,SAAQJ,KAAM,aAAYC,SAAU,UAAlD,CAA3B;EAEA,MAAMI,gBAAgE,GAAG,MAAM,IAAAC,kBAAA,EAC3EH,kBAD2E,EAE3E;IACII,OAAO,EAAE;MAAEC,aAAa,EAAEN;IAAjB;EADb,CAF2E,EAM1EO,IAN0E,CAMrEC,QAAQ,IAAIA,QAAQ,CAACC,IAAT,EANyD,EAO1EC,KAP0E,CAOpEC,CAAC,IAAI;IACRC,OAAO,CAACC,IAAR,CACK,uEAAsEf,KAAM,IAAGC,SAAU,MAAKY,CAAC,CAACG,OAAQ,EAD7G;IAGA,OAAO,IAAP;EACH,CAZ0E,CAA/E;EAcA,OAAOX,gBAAP;AACH,CAvBD;;AAyBO,MAAMY,oBAAoB,GAAG,MAAOC,MAAP,IAA8C;EAC9E,IAAIb,gBAAgB,GAAGc,OAAO,CAACC,GAAR,CAAYC,mBAAnC;;EACA,IAAI,CAAChB,gBAAL,EAAuB;IACnB,MAAMiB,cAAc,GAAG,MAAMvB,sBAAsB,CAACmB,MAAD,CAAnD;;IACA,IAAII,cAAJ,EAAoB;MAChBjB,gBAAgB,GAAGiB,cAAc,CAACC,OAAlC;IACH;EACJ;;EAED,IAAI,CAAClB,gBAAL,EAAuB;IACnB,OAAO,IAAP;EACH;;EAED,IAAI;IACA,OAAO,IAAAmB,mBAAA,EAAoCnB,gBAApC,CAAP;EACH,CAFD,CAEE,OAAOQ,CAAP,EAAU;IACR,MAAMZ,SAAS,GAAI,GAAEiB,MAAM,CAAClB,KAAM,IAAGkB,MAAM,CAACjB,SAAU,EAAtD;IACAa,OAAO,CAACC,IAAR,CACK,gFAA+Ed,SAAU,MAAKY,CAAC,CAACG,OAAQ,EAD7G;IAGA,OAAO,IAAP;EACH;AACJ,CAtBM"}
1
+ {"version":3,"names":["fetchWcpProjectLicense","orgId","projectId","projectEnvironmentApiKey","getLicenseEndpoint","getWcpApiUrl","encryptedLicense","fetch","headers","authorization","then","response","json","catch","e","console","warn","message","getWcpProjectLicense","params","process","env","WCP_PROJECT_LICENSE","fetchedLicense","license","decrypt"],"sources":["licenses.ts"],"sourcesContent":["import fetch from \"node-fetch\";\nimport { DecryptedWcpProjectLicense, EncryptedWcpProjectLicense } from \"./types\";\nimport { decrypt } from \"./encryption\";\nimport { getWcpApiUrl } from \"./urls\";\n\ninterface GetWcpProjectLicenseParams {\n orgId: string;\n projectId: string;\n projectEnvironmentApiKey: string;\n}\n\nconst fetchWcpProjectLicense = async ({\n orgId,\n projectId,\n projectEnvironmentApiKey\n}: GetWcpProjectLicenseParams) => {\n // Fetch and decrypt the license.\n const getLicenseEndpoint = getWcpApiUrl(`/orgs/${orgId}/projects/${projectId}/license`);\n\n const encryptedLicense: { license: EncryptedWcpProjectLicense } | null = await fetch(\n getLicenseEndpoint,\n {\n headers: { authorization: projectEnvironmentApiKey }\n }\n )\n .then(response => response.json())\n .catch(e => {\n console.warn(\n `An error occurred while trying to retrieve the license for project \"${orgId}/${projectId}\": ${e.message}`\n );\n return null;\n });\n\n return encryptedLicense;\n};\n\nexport const getWcpProjectLicense = async (params: GetWcpProjectLicenseParams) => {\n let encryptedLicense = process.env.WCP_PROJECT_LICENSE;\n if (!encryptedLicense) {\n const fetchedLicense = await fetchWcpProjectLicense(params);\n if (fetchedLicense) {\n encryptedLicense = fetchedLicense.license;\n }\n }\n\n if (!encryptedLicense) {\n return null;\n }\n\n try {\n return decrypt<DecryptedWcpProjectLicense>(encryptedLicense);\n } catch (e) {\n const projectId = `${params.orgId}/${params.projectId}`;\n console.warn(\n `An error occurred while trying to decrypt the retrieved license for project \"${projectId}\": ${e.message}`\n );\n return null;\n }\n};\n"],"mappings":";;;;;;;AAAA;AAEA;AACA;AAQA,MAAMA,sBAAsB,GAAG,OAAO;EAClCC,KAAK;EACLC,SAAS;EACTC;AACwB,CAAC,KAAK;EAC9B;EACA,MAAMC,kBAAkB,GAAG,IAAAC,kBAAY,EAAE,SAAQJ,KAAM,aAAYC,SAAU,UAAS,CAAC;EAEvF,MAAMI,gBAAgE,GAAG,MAAM,IAAAC,kBAAK,EAChFH,kBAAkB,EAClB;IACII,OAAO,EAAE;MAAEC,aAAa,EAAEN;IAAyB;EACvD,CAAC,CACJ,CACIO,IAAI,CAACC,QAAQ,IAAIA,QAAQ,CAACC,IAAI,EAAE,CAAC,CACjCC,KAAK,CAACC,CAAC,IAAI;IACRC,OAAO,CAACC,IAAI,CACP,uEAAsEf,KAAM,IAAGC,SAAU,MAAKY,CAAC,CAACG,OAAQ,EAAC,CAC7G;IACD,OAAO,IAAI;EACf,CAAC,CAAC;EAEN,OAAOX,gBAAgB;AAC3B,CAAC;AAEM,MAAMY,oBAAoB,GAAG,MAAOC,MAAkC,IAAK;EAC9E,IAAIb,gBAAgB,GAAGc,OAAO,CAACC,GAAG,CAACC,mBAAmB;EACtD,IAAI,CAAChB,gBAAgB,EAAE;IACnB,MAAMiB,cAAc,GAAG,MAAMvB,sBAAsB,CAACmB,MAAM,CAAC;IAC3D,IAAII,cAAc,EAAE;MAChBjB,gBAAgB,GAAGiB,cAAc,CAACC,OAAO;IAC7C;EACJ;EAEA,IAAI,CAAClB,gBAAgB,EAAE;IACnB,OAAO,IAAI;EACf;EAEA,IAAI;IACA,OAAO,IAAAmB,mBAAO,EAA6BnB,gBAAgB,CAAC;EAChE,CAAC,CAAC,OAAOQ,CAAC,EAAE;IACR,MAAMZ,SAAS,GAAI,GAAEiB,MAAM,CAAClB,KAAM,IAAGkB,MAAM,CAACjB,SAAU,EAAC;IACvDa,OAAO,CAACC,IAAI,CACP,gFAA+Ed,SAAU,MAAKY,CAAC,CAACG,OAAQ,EAAC,CAC7G;IACD,OAAO,IAAI;EACf;AACJ,CAAC;AAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/wcp",
3
- "version": "5.35.0-beta.1",
3
+ "version": "5.35.0",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,8 +21,8 @@
21
21
  "@babel/plugin-transform-runtime": "^7.16.4",
22
22
  "@babel/preset-env": "^7.19.4",
23
23
  "@babel/preset-typescript": "^7.18.6",
24
- "@webiny/cli": "^5.35.0-beta.1",
25
- "@webiny/project-utils": "^5.35.0-beta.1",
24
+ "@webiny/cli": "^5.35.0",
25
+ "@webiny/project-utils": "^5.35.0",
26
26
  "rimraf": "^3.0.2",
27
27
  "ttypescript": "^1.5.12",
28
28
  "typescript": "4.7.4"
@@ -40,5 +40,5 @@
40
40
  "__tests__"
41
41
  ]
42
42
  },
43
- "gitHead": "6b376faedf02e056efbbf1e4d46d537850773ce0"
43
+ "gitHead": "948cd1e05978e0ed25137ace7dd6c15ed0bf2cca"
44
44
  }
package/urls.js CHANGED
@@ -6,24 +6,18 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getWcpGqlApiUrl = exports.getWcpAppUrl = exports.getWcpApiUrl = void 0;
7
7
  const DEFAULT_WCP_API_URL = "https://api.webiny.com";
8
8
  const DEFAULT_WCP_APP_URL = "https://app.webiny.com";
9
-
10
9
  const getWcpApiUrl = path => {
11
10
  const apiUrl = process.env.WCP_API_URL || DEFAULT_WCP_API_URL;
12
11
  return path ? apiUrl + path : apiUrl;
13
12
  };
14
-
15
13
  exports.getWcpApiUrl = getWcpApiUrl;
16
-
17
14
  const getWcpGqlApiUrl = path => {
18
15
  const graphqlApi = getWcpApiUrl("/graphql");
19
16
  return path ? graphqlApi + path : graphqlApi;
20
17
  };
21
-
22
18
  exports.getWcpGqlApiUrl = getWcpGqlApiUrl;
23
-
24
19
  const getWcpAppUrl = path => {
25
20
  const appUrl = process.env.WCP_APP_URL || DEFAULT_WCP_APP_URL;
26
21
  return path ? appUrl + path : appUrl;
27
22
  };
28
-
29
23
  exports.getWcpAppUrl = getWcpAppUrl;
package/urls.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["DEFAULT_WCP_API_URL","DEFAULT_WCP_APP_URL","getWcpApiUrl","path","apiUrl","process","env","WCP_API_URL","getWcpGqlApiUrl","graphqlApi","getWcpAppUrl","appUrl","WCP_APP_URL"],"sources":["urls.ts"],"sourcesContent":["const DEFAULT_WCP_API_URL = \"https://api.webiny.com\";\nconst DEFAULT_WCP_APP_URL = \"https://app.webiny.com\";\n\nexport const getWcpApiUrl = (path?: string) => {\n const apiUrl = process.env.WCP_API_URL || DEFAULT_WCP_API_URL;\n return path ? apiUrl + path : apiUrl;\n};\n\nexport const getWcpGqlApiUrl = (path?: string) => {\n const graphqlApi = getWcpApiUrl(\"/graphql\");\n return path ? graphqlApi + path : graphqlApi;\n};\n\nexport const getWcpAppUrl = (path?: string) => {\n const appUrl = process.env.WCP_APP_URL || DEFAULT_WCP_APP_URL;\n return path ? appUrl + path : appUrl;\n};\n"],"mappings":";;;;;;AAAA,MAAMA,mBAAmB,GAAG,wBAA5B;AACA,MAAMC,mBAAmB,GAAG,wBAA5B;;AAEO,MAAMC,YAAY,GAAIC,IAAD,IAAmB;EAC3C,MAAMC,MAAM,GAAGC,OAAO,CAACC,GAAR,CAAYC,WAAZ,IAA2BP,mBAA1C;EACA,OAAOG,IAAI,GAAGC,MAAM,GAAGD,IAAZ,GAAmBC,MAA9B;AACH,CAHM;;;;AAKA,MAAMI,eAAe,GAAIL,IAAD,IAAmB;EAC9C,MAAMM,UAAU,GAAGP,YAAY,CAAC,UAAD,CAA/B;EACA,OAAOC,IAAI,GAAGM,UAAU,GAAGN,IAAhB,GAAuBM,UAAlC;AACH,CAHM;;;;AAKA,MAAMC,YAAY,GAAIP,IAAD,IAAmB;EAC3C,MAAMQ,MAAM,GAAGN,OAAO,CAACC,GAAR,CAAYM,WAAZ,IAA2BX,mBAA1C;EACA,OAAOE,IAAI,GAAGQ,MAAM,GAAGR,IAAZ,GAAmBQ,MAA9B;AACH,CAHM"}
1
+ {"version":3,"names":["DEFAULT_WCP_API_URL","DEFAULT_WCP_APP_URL","getWcpApiUrl","path","apiUrl","process","env","WCP_API_URL","getWcpGqlApiUrl","graphqlApi","getWcpAppUrl","appUrl","WCP_APP_URL"],"sources":["urls.ts"],"sourcesContent":["const DEFAULT_WCP_API_URL = \"https://api.webiny.com\";\nconst DEFAULT_WCP_APP_URL = \"https://app.webiny.com\";\n\nexport const getWcpApiUrl = (path?: string) => {\n const apiUrl = process.env.WCP_API_URL || DEFAULT_WCP_API_URL;\n return path ? apiUrl + path : apiUrl;\n};\n\nexport const getWcpGqlApiUrl = (path?: string) => {\n const graphqlApi = getWcpApiUrl(\"/graphql\");\n return path ? graphqlApi + path : graphqlApi;\n};\n\nexport const getWcpAppUrl = (path?: string) => {\n const appUrl = process.env.WCP_APP_URL || DEFAULT_WCP_APP_URL;\n return path ? appUrl + path : appUrl;\n};\n"],"mappings":";;;;;;AAAA,MAAMA,mBAAmB,GAAG,wBAAwB;AACpD,MAAMC,mBAAmB,GAAG,wBAAwB;AAE7C,MAAMC,YAAY,GAAIC,IAAa,IAAK;EAC3C,MAAMC,MAAM,GAAGC,OAAO,CAACC,GAAG,CAACC,WAAW,IAAIP,mBAAmB;EAC7D,OAAOG,IAAI,GAAGC,MAAM,GAAGD,IAAI,GAAGC,MAAM;AACxC,CAAC;AAAC;AAEK,MAAMI,eAAe,GAAIL,IAAa,IAAK;EAC9C,MAAMM,UAAU,GAAGP,YAAY,CAAC,UAAU,CAAC;EAC3C,OAAOC,IAAI,GAAGM,UAAU,GAAGN,IAAI,GAAGM,UAAU;AAChD,CAAC;AAAC;AAEK,MAAMC,YAAY,GAAIP,IAAa,IAAK;EAC3C,MAAMQ,MAAM,GAAGN,OAAO,CAACC,GAAG,CAACM,WAAW,IAAIX,mBAAmB;EAC7D,OAAOE,IAAI,GAAGQ,MAAM,GAAGR,IAAI,GAAGQ,MAAM;AACxC,CAAC;AAAC"}