@stackbit/dev 1.1.0-feature-dev-server.0 → 2.0.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.
@@ -14,7 +14,6 @@ import socketService from '@stackbit/dev-common/dist/services/socket-service';
14
14
  import { injectScript } from '@stackbit/dev-common/dist/utils/proxy-utils';
15
15
 
16
16
  interface ServerOptions {
17
- noProxy?: boolean;
18
17
  serverPort: number;
19
18
  ssgPort: number;
20
19
  ssgHost: string;
@@ -43,7 +42,7 @@ export async function start({ serverPort, ssgPort, ssgHost, rootDir, runnableDir
43
42
 
44
43
  logger.debug('Done runner init');
45
44
 
46
- if (!options.noProxy && ssgHost?.toLowerCase().startsWith('https')) {
45
+ if (ssgHost?.toLowerCase().startsWith('https')) {
47
46
  process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
48
47
  }
49
48
 
@@ -119,9 +118,7 @@ export async function start({ serverPort, ssgPort, ssgHost, rootDir, runnableDir
119
118
  ).toString('base64')}`;
120
119
 
121
120
  routes(server, runner, uuid, openUrl);
122
- if (!options.noProxy) {
123
- proxy(server, ssgHost, ssgPort, runner);
124
- }
121
+ proxy(server, ssgHost, ssgPort, runner);
125
122
 
126
123
  return new Promise<Runner>((resolve) => {
127
124
  httpServer.listen(serverPort, () => {
@@ -1,35 +1,8 @@
1
1
  import axios from 'axios';
2
2
  import config from '../config';
3
3
 
4
- export type LocalDevConfig = {
5
- /** local user id, stored in file under home folder ~/.config/stackbit-dev/config.json */
6
- i: string;
7
- /** local dev version */
8
- v: string;
9
- /** local port */
10
- p: number;
11
- /** cms id */
12
- cms?: string;
13
- /** ssg id */
14
- ssg?: string;
15
- /** ngrok hostname */
16
- h?: string;
17
- spaceIds?: [string];
18
- projectId?: string;
19
- contentfulAccessToken?: string;
20
- contentfulSpaces?: any;
21
- csi?: boolean;
22
- cloudinary?: {
23
- cloudName: string;
24
- apiKey: string;
25
- };
26
- aprimo?: {
27
- tenant: string;
28
- };
29
- };
30
-
31
4
  export default {
32
- updateLocalDev: (userId: string, localDevConfig: LocalDevConfig) => {
5
+ updateLocalDev: (userId: string, localDevConfig: any) => {
33
6
  return axios.post(`${config.apiUrl}/project/local/${userId}`, {
34
7
  config: localDevConfig
35
8
  });
@@ -273,6 +273,17 @@ export type APIMethodUploadAssets = {
273
273
  result: ContentStoreTypes.APIAsset[];
274
274
  };
275
275
 
276
+ export type APIMethodUpdateAsset = {
277
+ method: 'updateAsset';
278
+ data: {
279
+ srcType: string;
280
+ srcProjectId: string;
281
+ srcAssetId: string;
282
+ updateOperations: UpdateOperation[];
283
+ };
284
+ result: { srcAssetId: string };
285
+ };
286
+
276
287
  export type APIMethodCreatePreset = {
277
288
  method: 'createPreset';
278
289
  data: {