@supernova-studio/model 0.47.29 → 0.47.30
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 +61 -1
- package/dist/index.d.ts +61 -1
- package/dist/index.js +238 -226
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +254 -242
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/export/export-jobs.ts +3 -0
- package/src/export/export-runner/export-context.ts +2 -0
- package/src/export/exporter.ts +1 -1
- package/src/integrations/integration.ts +8 -2
package/package.json
CHANGED
|
@@ -43,6 +43,9 @@ export const ExportJobS3DestinationResult = z.object({
|
|
|
43
43
|
urlPrefix: z.string().optional(),
|
|
44
44
|
path: z.string(),
|
|
45
45
|
files: z.array(z.string()),
|
|
46
|
+
|
|
47
|
+
url: nullishToOptional(z.string()),
|
|
48
|
+
urls: nullishToOptional(z.string().array()),
|
|
46
49
|
});
|
|
47
50
|
|
|
48
51
|
export const ExportJobDocsDestinationResult = z.object({
|
|
@@ -12,11 +12,13 @@ export const ExportJobContext = z.object({
|
|
|
12
12
|
accessToken: z.string(),
|
|
13
13
|
|
|
14
14
|
designSystemId: z.string(),
|
|
15
|
+
designSystemName: z.string(),
|
|
15
16
|
exporterId: z.string(),
|
|
16
17
|
versionId: z.string(),
|
|
17
18
|
brandId: z.string().optional(),
|
|
18
19
|
themeId: z.string().optional(),
|
|
19
20
|
|
|
21
|
+
exporterName: z.string(),
|
|
20
22
|
exporterPackageUrl: z.string(),
|
|
21
23
|
exporterPropertyValues: ExporterPropertyValue.array(),
|
|
22
24
|
|
package/src/export/exporter.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { PulsarContributionConfigurationProperty, PulsarContributionVariant, Pul
|
|
|
5
5
|
|
|
6
6
|
export const ExporterType = z.enum(["code", "documentation"]);
|
|
7
7
|
export const ExporterSource = z.enum(["git", "upload"]);
|
|
8
|
-
export const ExporterTag = z.string()
|
|
8
|
+
export const ExporterTag = z.string();
|
|
9
9
|
|
|
10
10
|
export const ExporterPulsarDetails = z.object({
|
|
11
11
|
description: z.string(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { nullishToOptional } from "../helpers";
|
|
3
3
|
import { UserMinified } from "../users/user-minified";
|
|
4
|
+
import { tryParseUrl } from "../utils";
|
|
4
5
|
|
|
5
6
|
export const IntegrationDesignSystem = z.object({
|
|
6
7
|
designSystemId: z.string(),
|
|
@@ -94,10 +95,15 @@ export const IntegrationToken = z
|
|
|
94
95
|
token_bitbucket_username: z.string().optional(), // Bitbucket only
|
|
95
96
|
custom_url: z
|
|
96
97
|
.string()
|
|
97
|
-
.url()
|
|
98
98
|
.optional()
|
|
99
|
-
.transform(value =>
|
|
99
|
+
.transform(value => {
|
|
100
|
+
if (!value?.trim()) return undefined;
|
|
101
|
+
return formatCustomUrl(value);
|
|
102
|
+
}),
|
|
100
103
|
})
|
|
104
|
+
.refine(data => {
|
|
105
|
+
return !data.custom_url || tryParseUrl(data.custom_url);
|
|
106
|
+
}, "Custom URL must be a valid URL")
|
|
101
107
|
.refine(data => {
|
|
102
108
|
if (data.custom_url && data.token_azure_organization_name) {
|
|
103
109
|
return false;
|