@livechat/developer-studio-api 2.0.10 → 2.0.11
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -6
- package/dist/index.mjs +17 -6
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -2143,7 +2143,7 @@ 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>;
|
|
2146
|
+
createSiteByInstallationId(name: string, repositoryFullName: string, target: AppRepositoryTarget, installationId: string, branch?: string | undefined, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<NetlifySite>;
|
|
2147
2147
|
createSiteByDeployKey(name: string, repositoryFullName: string, 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>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2143,7 +2143,7 @@ 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>;
|
|
2146
|
+
createSiteByInstallationId(name: string, repositoryFullName: string, target: AppRepositoryTarget, installationId: string, branch?: string | undefined, authorization?: NetlifyClientInstanceAuthorization | undefined): Promise<NetlifySite>;
|
|
2147
2147
|
createSiteByDeployKey(name: string, repositoryFullName: string, 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>;
|
package/dist/index.js
CHANGED
|
@@ -964,8 +964,19 @@ 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
|
+
repo: ["@netlify/plugin-nextjs"],
|
|
971
|
+
package: [{ package: "@netlify/plugin-nextjs" }],
|
|
972
|
+
dir: ".next",
|
|
973
|
+
cmd: "npm run build"
|
|
974
|
+
} : {
|
|
975
|
+
repo: [],
|
|
976
|
+
package: [],
|
|
977
|
+
dir: "dist",
|
|
978
|
+
cmd: "npm run build"
|
|
979
|
+
};
|
|
969
980
|
const response = yield netlifyClientInstance.post(
|
|
970
981
|
`/sites`,
|
|
971
982
|
{
|
|
@@ -977,13 +988,13 @@ var netlifySiteApi = {
|
|
|
977
988
|
private: true,
|
|
978
989
|
installation_id: installationId,
|
|
979
990
|
owner_type: "User",
|
|
980
|
-
plugins: ["@netlify/plugin-nextjs"],
|
|
981
991
|
env: {},
|
|
982
|
-
|
|
983
|
-
|
|
992
|
+
plugins: config.repo,
|
|
993
|
+
dir: config.dir,
|
|
994
|
+
cmd: config.cmd
|
|
984
995
|
},
|
|
985
996
|
default_hooks_data: {},
|
|
986
|
-
plugins:
|
|
997
|
+
plugins: config.package,
|
|
987
998
|
created_via: ""
|
|
988
999
|
},
|
|
989
1000
|
getNetlifyClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
package/dist/index.mjs
CHANGED
|
@@ -880,8 +880,19 @@ 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
|
+
repo: ["@netlify/plugin-nextjs"],
|
|
887
|
+
package: [{ package: "@netlify/plugin-nextjs" }],
|
|
888
|
+
dir: ".next",
|
|
889
|
+
cmd: "npm run build"
|
|
890
|
+
} : {
|
|
891
|
+
repo: [],
|
|
892
|
+
package: [],
|
|
893
|
+
dir: "dist",
|
|
894
|
+
cmd: "npm run build"
|
|
895
|
+
};
|
|
885
896
|
const response = yield netlifyClientInstance.post(
|
|
886
897
|
`/sites`,
|
|
887
898
|
{
|
|
@@ -893,13 +904,13 @@ var netlifySiteApi = {
|
|
|
893
904
|
private: true,
|
|
894
905
|
installation_id: installationId,
|
|
895
906
|
owner_type: "User",
|
|
896
|
-
plugins: ["@netlify/plugin-nextjs"],
|
|
897
907
|
env: {},
|
|
898
|
-
|
|
899
|
-
|
|
908
|
+
plugins: config.repo,
|
|
909
|
+
dir: config.dir,
|
|
910
|
+
cmd: config.cmd
|
|
900
911
|
},
|
|
901
912
|
default_hooks_data: {},
|
|
902
|
-
plugins:
|
|
913
|
+
plugins: config.package,
|
|
903
914
|
created_via: ""
|
|
904
915
|
},
|
|
905
916
|
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.
|
|
3
|
+
"version": "2.0.11",
|
|
4
4
|
"description": "This project is API for LiveChat Developer Studio.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"typescript": "^5.1.6",
|
|
20
20
|
"config": "0.0.0",
|
|
21
21
|
"tsconfig": "0.0.0",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
22
|
+
"types": "0.0.1",
|
|
23
|
+
"eslint-config-custom-lib": "0.0.1"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|