@livechat/developer-studio-api 2.0.10 → 2.0.12

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/dist/index.d.mts CHANGED
@@ -2143,8 +2143,8 @@ declare const api: {
2143
2143
  id: string;
2144
2144
  title: string;
2145
2145
  }[]>;
2146
- createSiteByInstallationId(name: string, repositoryFullName: string, installationId: string, branch?: string | undefined, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<NetlifySite>;
2147
- createSiteByDeployKey(name: string, repositoryFullName: string, deployKeyId: string, branch?: string | undefined, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<NetlifySite>;
2146
+ createSiteByInstallationId(name: string, repositoryFullName: string, target: AppRepositoryTarget, installationId: string, branch?: string | undefined, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<NetlifySite>;
2147
+ createSiteByDeployKey(name: string, repositoryFullName: string, target: AppRepositoryTarget, deployKeyId: string, branch?: string | undefined, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<NetlifySite>;
2148
2148
  removeSite(siteId: string, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<void>;
2149
2149
  triggerSiteBuild(siteId: string, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<void>;
2150
2150
  addGitHubInstallationToSite(siteId: string, installationId: string, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<void>;
package/dist/index.d.ts CHANGED
@@ -2143,8 +2143,8 @@ declare const api: {
2143
2143
  id: string;
2144
2144
  title: string;
2145
2145
  }[]>;
2146
- createSiteByInstallationId(name: string, repositoryFullName: string, installationId: string, branch?: string | undefined, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<NetlifySite>;
2147
- createSiteByDeployKey(name: string, repositoryFullName: string, deployKeyId: string, branch?: string | undefined, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<NetlifySite>;
2146
+ createSiteByInstallationId(name: string, repositoryFullName: string, target: AppRepositoryTarget, installationId: string, branch?: string | undefined, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<NetlifySite>;
2147
+ createSiteByDeployKey(name: string, repositoryFullName: string, target: AppRepositoryTarget, deployKeyId: string, branch?: string | undefined, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<NetlifySite>;
2148
2148
  removeSite(siteId: string, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<void>;
2149
2149
  triggerSiteBuild(siteId: string, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<void>;
2150
2150
  addGitHubInstallationToSite(siteId: string, installationId: string, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<void>;
package/dist/index.js CHANGED
@@ -964,8 +964,17 @@ var netlifySiteApi = {
964
964
  return snippets;
965
965
  });
966
966
  },
967
- createSiteByInstallationId(name, repositoryFullName, installationId, branch, authorization) {
968
- return __async(this, null, function* () {
967
+ createSiteByInstallationId(name, repositoryFullName, target, installationId, branch, authorization) {
968
+ return __async(this, null, function* () {
969
+ const config = target === "nextjs" ? {
970
+ plugins: ["@netlify/plugin-nextjs"],
971
+ dir: ".next",
972
+ cmd: "npm run build"
973
+ } : {
974
+ plugins: [],
975
+ dir: "dist",
976
+ cmd: "npm run build"
977
+ };
969
978
  const response = yield netlifyClientInstance.post(
970
979
  `/sites`,
971
980
  {
@@ -977,13 +986,13 @@ var netlifySiteApi = {
977
986
  private: true,
978
987
  installation_id: installationId,
979
988
  owner_type: "User",
980
- plugins: ["@netlify/plugin-nextjs"],
981
989
  env: {},
982
- dir: ".next",
983
- cmd: "npm run build"
990
+ plugins: config.plugins,
991
+ dir: config.dir,
992
+ cmd: config.cmd
984
993
  },
985
994
  default_hooks_data: {},
986
- plugins: [{ package: "@netlify/plugin-nextjs" }],
995
+ plugins: config.plugins,
987
996
  created_via: ""
988
997
  },
989
998
  getNetlifyClientConfig(__spreadProps(__spreadValues({}, authorization), {
@@ -994,8 +1003,17 @@ var netlifySiteApi = {
994
1003
  return response.data;
995
1004
  });
996
1005
  },
997
- createSiteByDeployKey(name, repositoryFullName, deployKeyId, branch, authorization) {
1006
+ createSiteByDeployKey(name, repositoryFullName, target, deployKeyId, branch, authorization) {
998
1007
  return __async(this, null, function* () {
1008
+ const config = target === "nextjs" ? {
1009
+ plugins: ["@netlify/plugin-nextjs"],
1010
+ dir: ".next",
1011
+ cmd: "npm run build"
1012
+ } : {
1013
+ plugins: [],
1014
+ dir: "dist",
1015
+ cmd: "npm run build"
1016
+ };
999
1017
  const response = yield netlifyClientInstance.post(
1000
1018
  `/sites`,
1001
1019
  {
@@ -1005,21 +1023,13 @@ var netlifySiteApi = {
1005
1023
  branch,
1006
1024
  repo: repositoryFullName,
1007
1025
  deploy_key_id: deployKeyId,
1008
- plugins: [
1009
- {
1010
- package: "@netlify/plugin-nextjs"
1011
- }
1012
- ],
1013
- dir: ".next",
1014
1026
  env: {},
1015
- cmd: "npm run build",
1016
- private: true
1027
+ private: true,
1028
+ plugins: config.plugins,
1029
+ dir: config.dir,
1030
+ cmd: config.cmd
1017
1031
  },
1018
- plugins: [
1019
- {
1020
- package: "@netlify/plugin-nextjs"
1021
- }
1022
- ],
1032
+ plugins: config.plugins,
1023
1033
  created_via: ""
1024
1034
  },
1025
1035
  getNetlifyClientConfig(__spreadProps(__spreadValues({}, authorization), {
package/dist/index.mjs CHANGED
@@ -880,8 +880,17 @@ var netlifySiteApi = {
880
880
  return snippets;
881
881
  });
882
882
  },
883
- createSiteByInstallationId(name, repositoryFullName, installationId, branch, authorization) {
884
- return __async(this, null, function* () {
883
+ createSiteByInstallationId(name, repositoryFullName, target, installationId, branch, authorization) {
884
+ return __async(this, null, function* () {
885
+ const config = target === "nextjs" ? {
886
+ plugins: ["@netlify/plugin-nextjs"],
887
+ dir: ".next",
888
+ cmd: "npm run build"
889
+ } : {
890
+ plugins: [],
891
+ dir: "dist",
892
+ cmd: "npm run build"
893
+ };
885
894
  const response = yield netlifyClientInstance.post(
886
895
  `/sites`,
887
896
  {
@@ -893,13 +902,13 @@ var netlifySiteApi = {
893
902
  private: true,
894
903
  installation_id: installationId,
895
904
  owner_type: "User",
896
- plugins: ["@netlify/plugin-nextjs"],
897
905
  env: {},
898
- dir: ".next",
899
- cmd: "npm run build"
906
+ plugins: config.plugins,
907
+ dir: config.dir,
908
+ cmd: config.cmd
900
909
  },
901
910
  default_hooks_data: {},
902
- plugins: [{ package: "@netlify/plugin-nextjs" }],
911
+ plugins: config.plugins,
903
912
  created_via: ""
904
913
  },
905
914
  getNetlifyClientConfig(__spreadProps(__spreadValues({}, authorization), {
@@ -910,8 +919,17 @@ var netlifySiteApi = {
910
919
  return response.data;
911
920
  });
912
921
  },
913
- createSiteByDeployKey(name, repositoryFullName, deployKeyId, branch, authorization) {
922
+ createSiteByDeployKey(name, repositoryFullName, target, deployKeyId, branch, authorization) {
914
923
  return __async(this, null, function* () {
924
+ const config = target === "nextjs" ? {
925
+ plugins: ["@netlify/plugin-nextjs"],
926
+ dir: ".next",
927
+ cmd: "npm run build"
928
+ } : {
929
+ plugins: [],
930
+ dir: "dist",
931
+ cmd: "npm run build"
932
+ };
915
933
  const response = yield netlifyClientInstance.post(
916
934
  `/sites`,
917
935
  {
@@ -921,21 +939,13 @@ var netlifySiteApi = {
921
939
  branch,
922
940
  repo: repositoryFullName,
923
941
  deploy_key_id: deployKeyId,
924
- plugins: [
925
- {
926
- package: "@netlify/plugin-nextjs"
927
- }
928
- ],
929
- dir: ".next",
930
942
  env: {},
931
- cmd: "npm run build",
932
- private: true
943
+ private: true,
944
+ plugins: config.plugins,
945
+ dir: config.dir,
946
+ cmd: config.cmd
933
947
  },
934
- plugins: [
935
- {
936
- package: "@netlify/plugin-nextjs"
937
- }
938
- ],
948
+ plugins: config.plugins,
939
949
  created_via: ""
940
950
  },
941
951
  getNetlifyClientConfig(__spreadProps(__spreadValues({}, authorization), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livechat/developer-studio-api",
3
- "version": "2.0.10",
3
+ "version": "2.0.12",
4
4
  "description": "This project is API for LiveChat Developer Studio.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -18,9 +18,9 @@
18
18
  "tsup": "^7.1.0",
19
19
  "typescript": "^5.1.6",
20
20
  "config": "0.0.0",
21
- "tsconfig": "0.0.0",
22
21
  "eslint-config-custom-lib": "0.0.1",
23
- "types": "0.0.1"
22
+ "types": "0.0.1",
23
+ "tsconfig": "0.0.0"
24
24
  },
25
25
  "scripts": {
26
26
  "build": "tsup src/index.ts --format esm,cjs --dts",