@mondaydotcomorg/z2h-cli 0.16.0 → 0.17.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.
@@ -63,7 +63,7 @@ async function buildAndStamp(opts) {
63
63
  };
64
64
  }
65
65
  async function deployPreview({ paths, consumerName, appName, token, opts }) {
66
- const previewId = opts.previewId ?? crypto.randomUUID();
66
+ const previewId = opts.previewId ?? crypto.randomUUID().slice(0, 8);
67
67
  const previewSlug = util_appName.buildPreviewSlug(consumerName, previewId);
68
68
  const previewAppName = util_appName.mfAppName(previewSlug);
69
69
  const keyPrefix = `${constants.S3_PREVIEWS_FOLDER}/${appName}/${previewId}/MF`;
@@ -57,7 +57,7 @@ async function buildAndStamp(opts) {
57
57
  };
58
58
  }
59
59
  async function deployPreview({ paths, consumerName, appName, token, opts }) {
60
- const previewId = opts.previewId ?? randomUUID();
60
+ const previewId = opts.previewId ?? randomUUID().slice(0, 8);
61
61
  const previewSlug = buildPreviewSlug(consumerName, previewId);
62
62
  const previewAppName = mfAppName(previewSlug);
63
63
  const keyPrefix = `${S3_PREVIEWS_FOLDER}/${appName}/${previewId}/MF`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mondaydotcomorg/z2h-cli",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "bin": "./bin/z2h-cli.js",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -110,7 +110,7 @@ describe('deploy --preview', () => {
110
110
  expect(brokerProvider.brokerCredentialProvider).toHaveBeenCalledTimes(1);
111
111
  const call = vi.mocked(brokerProvider.brokerCredentialProvider).mock.calls[0][0];
112
112
  expect(call.appName).toBe('mf-my-app');
113
- expect(call.previewId).toMatch(/^[0-9a-f-]{36}$/);
113
+ expect(call.previewId).toMatch(/^[0-9a-f]{8}$/);
114
114
 
115
115
  expect(uploadDir).toHaveBeenCalledWith(path.join(tmp, '.zth', 'build'), `previews/mf-my-app/${call.previewId}/MF`);
116
116
  });
@@ -95,7 +95,7 @@ async function buildAndStamp(opts: {
95
95
  }
96
96
 
97
97
  async function deployPreview({ paths, consumerName, appName, token, opts }: DeployContext): Promise<void> {
98
- const previewId = opts.previewId ?? randomUUID();
98
+ const previewId = opts.previewId ?? randomUUID().slice(0, 8);
99
99
  const previewSlug = buildPreviewSlug(consumerName, previewId);
100
100
  const previewAppName = mfAppName(previewSlug);
101
101
  const keyPrefix = `${S3_PREVIEWS_FOLDER}/${appName}/${previewId}/MF`;