@equinor/fusion-framework-cli 11.4.0 → 12.0.2

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.
@@ -8,13 +8,13 @@ import { z } from 'zod';
8
8
  export const ApiAppConfigSchema = z
9
9
  .object({
10
10
  environment: z
11
- .record(z.any())
11
+ .record(z.string(), z.any())
12
12
  .describe('Key-value map of environment-specific variables for the application. Defaults to an empty object if not provided.')
13
13
  .optional()
14
14
  .default({}), // Arbitrary environment variables, default empty
15
15
  endpoints: z
16
- .record(z.object({
17
- url: z.string().describe('The endpoint URL. This field is required.'),
16
+ .record(z.string(), z.object({
17
+ url: z.string({ message: 'The endpoint URL. This field is required.' }),
18
18
  scopes: z
19
19
  .array(z.string())
20
20
  .optional()
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../src/lib/app/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;SACf,QAAQ,CACP,mHAAmH,CACpH;SACA,QAAQ,EAAE;SACV,OAAO,CAAC,EAAE,CAAC,EAAE,iDAAiD;IACjE,SAAS,EAAE,CAAC;SACT,MAAM,CACL,CAAC,CAAC,MAAM,CAAC;QACP,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;QACrE,MAAM,EAAE,CAAC;aACN,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACjB,QAAQ,EAAE;aACV,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CACP,kFAAkF,CACnF;KACJ,CAAC,CACH;SACA,QAAQ,CACP,sHAAsH,CACvH;SACA,QAAQ,EAAE,EAAE,yBAAyB;CACzC,CAAC;KACD,QAAQ,CACP,6GAA6G,CAC9G,CAAC"}
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../src/lib/app/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC;SAC3B,QAAQ,CACP,mHAAmH,CACpH;SACA,QAAQ,EAAE;SACV,OAAO,CAAC,EAAE,CAAC,EAAE,iDAAiD;IACjE,SAAS,EAAE,CAAC;SACT,MAAM,CACL,CAAC,CAAC,MAAM,EAAE,EACV,CAAC,CAAC,MAAM,CAAC;QACP,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,2CAA2C,EAAE,CAAC;QACvE,MAAM,EAAE,CAAC;aACN,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACjB,QAAQ,EAAE;aACV,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CACP,kFAAkF,CACnF;KACJ,CAAC,CACH;SACA,QAAQ,CACP,sHAAsH,CACvH;SACA,QAAQ,EAAE,EAAE,yBAAyB;CACzC,CAAC;KACD,QAAQ,CACP,6GAA6G,CAC9G,CAAC"}
@@ -47,7 +47,7 @@ export const loadPortalManifest = async (env, options) => {
47
47
  const manifest = importResult.config;
48
48
  const validation = PortalManifestSchema.safeParse(manifest);
49
49
  if (!validation.success) {
50
- throw new Error(`Invalid portal manifest: ${validation.error.errors.map((e) => `${e.path.join('.')}: ${e.message}`).join('; ')}`);
50
+ throw new Error(`Invalid portal manifest: ${validation.error.issues.map((e) => `${e.path.join('.')}: ${e.message}`).join('; ')}`);
51
51
  }
52
52
  return {
53
53
  manifest,
@@ -11,88 +11,48 @@ import { z } from 'zod';
11
11
  export const PortalManifestBuildSchema = z.object({
12
12
  // Main entry point for the portal (required)
13
13
  templateEntry: z
14
- .string({
15
- required_error: 'templateEntry is required in build section',
16
- invalid_type_error: 'templateEntry must be a string',
17
- })
14
+ .string({ message: 'templateEntry must be a string' })
18
15
  .describe('Main entry point for the portal'),
19
16
  // Schema file for portal validation (required)
20
17
  schemaEntry: z
21
- .string({
22
- required_error: 'schemaEntry is required in build section',
23
- invalid_type_error: 'schemaEntry must be a string',
24
- })
18
+ .string({ message: 'schemaEntry must be a string' })
25
19
  .describe('Schema file for portal validation'),
26
20
  // Asset path for dev/preview builds (optional)
27
21
  assetPath: z
28
- .string({
29
- invalid_type_error: 'assetPath must be a string',
30
- })
22
+ .string({ message: 'assetPath must be a string' })
31
23
  .optional()
32
24
  .describe('Asset path for dev/preview builds'),
33
25
  // GitHub repo URL or local git remote (optional)
34
26
  githubRepo: z
35
- .string({
36
- invalid_type_error: 'githubRepo must be a string',
37
- })
27
+ .string({ message: 'githubRepo must be a string' })
38
28
  .optional()
39
29
  .describe('GitHub repo URL or local git remote'),
40
30
  // Version from package.json (required)
41
- version: z
42
- .string({
43
- required_error: 'version is required in build section',
44
- invalid_type_error: 'version must be a string',
45
- })
46
- .describe('Version from package.json'),
31
+ version: z.string({ message: 'version must be a string' }).describe('Version from package.json'),
47
32
  // Current build timestamp (ISO8601, required)
48
33
  timestamp: z
49
- .string({
50
- required_error: 'timestamp is required in build section',
51
- invalid_type_error: 'timestamp must be a string',
52
- })
34
+ .string({ message: 'timestamp must be a string' })
53
35
  .describe('Current build timestamp (ISO8601)'),
54
36
  // Current git commit SHA (required)
55
- commitSha: z
56
- .string({
57
- required_error: 'commitSha is required in build section',
58
- invalid_type_error: 'commitSha must be a string',
59
- })
60
- .describe('Current git commit SHA'),
37
+ commitSha: z.string({ message: 'commitSha must be a string' }).describe('Current git commit SHA'),
61
38
  // Optional build annotations (key-value pairs)
62
- annotations: z
63
- .record(z.string(), {
64
- invalid_type_error: 'annotations must be a record of string values',
65
- })
66
- .optional()
67
- .describe('Optional build annotations'),
39
+ annotations: z.record(z.string(), z.string()).optional().describe('Optional build annotations'),
68
40
  // Optional project homepage
69
41
  projectPage: z
70
- .string({
71
- invalid_type_error: 'projectPage must be a string',
72
- })
42
+ .string({ message: 'projectPage must be a string' })
73
43
  .optional()
74
44
  .describe('Optional project homepage'),
75
45
  // List of allowed asset extensions (with leading dot, required)
76
46
  allowedExtensions: z
77
- .array(z.string({
78
- invalid_type_error: 'Each allowed extension must be a string',
79
- }), {
80
- required_error: 'allowedExtensions is required in build section',
81
- invalid_type_error: 'allowedExtensions must be an array of strings',
47
+ .array(z.string({ message: 'Each allowed extension must be a string' }), {
48
+ message: 'allowedExtensions must be an array of strings',
82
49
  })
83
50
  .describe('List of allowed asset extensions (with leading dot)'),
84
51
  // Optional schema for the portal (record of unknown values)
85
- schema: z
86
- .record(z.unknown(), {
87
- invalid_type_error: 'schema must be a record of unknown values',
88
- })
89
- .optional()
90
- .describe('Optional schema for the portal'),
52
+ schema: z.record(z.string(), z.unknown()).optional().describe('Optional schema for the portal'),
91
53
  // Optional configuration for the portal (record of unknown values)
92
54
  config: z
93
- .record(z.unknown(), {
94
- invalid_type_error: 'config must be a record of unknown values',
95
- })
55
+ .record(z.string(), z.unknown())
96
56
  .optional()
97
57
  .describe('Optional configuration for the portal'),
98
58
  });
@@ -109,23 +69,16 @@ export const PortalManifestBuildSchema = z.object({
109
69
  export const PortalManifestSchema = z.object({
110
70
  // Short app key (unscoped, derived from package name, required)
111
71
  name: z
112
- .string({
113
- required_error: 'name is required in portal manifest',
114
- invalid_type_error: 'name must be a string',
115
- })
72
+ .string({ message: 'name must be a string' })
116
73
  .describe('Short app key (unscoped, derived from package name)'),
117
74
  // Full package name, may include scope (optional)
118
75
  displayName: z
119
- .string({
120
- invalid_type_error: 'displayName must be a string',
121
- })
76
+ .string({ message: 'displayName must be a string' })
122
77
  .optional()
123
78
  .describe('Full package name, may include scope'),
124
79
  // Description of the portal (optional)
125
80
  description: z
126
- .string({
127
- invalid_type_error: 'description must be a string',
128
- })
81
+ .string({ message: 'description must be a string' })
129
82
  .optional()
130
83
  .describe('Description of the portal'),
131
84
  // Build section (required, validated by PortalManifestBuildSchema)
@@ -1 +1 @@
1
- {"version":3,"file":"portal-manifest.schema.js","sourceRoot":"","sources":["../../../../src/lib/portal/portal-manifest.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,6CAA6C;IAC7C,aAAa,EAAE,CAAC;SACb,MAAM,CAAC;QACN,cAAc,EAAE,4CAA4C;QAC5D,kBAAkB,EAAE,gCAAgC;KACrD,CAAC;SACD,QAAQ,CAAC,iCAAiC,CAAC;IAC9C,+CAA+C;IAC/C,WAAW,EAAE,CAAC;SACX,MAAM,CAAC;QACN,cAAc,EAAE,0CAA0C;QAC1D,kBAAkB,EAAE,8BAA8B;KACnD,CAAC;SACD,QAAQ,CAAC,mCAAmC,CAAC;IAChD,+CAA+C;IAC/C,SAAS,EAAE,CAAC;SACT,MAAM,CAAC;QACN,kBAAkB,EAAE,4BAA4B;KACjD,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,CAAC,mCAAmC,CAAC;IAChD,iDAAiD;IACjD,UAAU,EAAE,CAAC;SACV,MAAM,CAAC;QACN,kBAAkB,EAAE,6BAA6B;KAClD,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,CAAC,qCAAqC,CAAC;IAClD,uCAAuC;IACvC,OAAO,EAAE,CAAC;SACP,MAAM,CAAC;QACN,cAAc,EAAE,sCAAsC;QACtD,kBAAkB,EAAE,0BAA0B;KAC/C,CAAC;SACD,QAAQ,CAAC,2BAA2B,CAAC;IACxC,8CAA8C;IAC9C,SAAS,EAAE,CAAC;SACT,MAAM,CAAC;QACN,cAAc,EAAE,wCAAw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AAC;IAC3C,gEAAgE;IAChE,IAAI,EAAE,CAAC;SACJ,MAAM,CAAC;QACN,cAAc,EAAE,qCAAqC;QACrD,kBAAkB,EAAE,uBAAuB;KAC5C,CAAC;SACD,QAAQ,CAAC,qDAAqD,CAAC;IAClE,kDAAkD;IAClD,WAAW,EAAE,CAAC;SACX,MAAM,CAAC;QACN,kBAAkB,EAAE,8BAA8B;KACnD,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,CAAC,sCAAsC,CAAC;IACnD,uCAAuC;IACvC,WAAW,EAAE,CAAC;SACX,MAAM,CAAC;QACN,kBAAkB,EAAE,8BAA8B;KACnD,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,CAAC,2BAA2B,CAAC;IACxC,mEAAmE;IACnE,KAAK,EAAE,yBAAyB;CACjC,CAAC,CAAC"}
1
+ {"version":3,"file":"portal-manifest.schema.js","sourceRoot":"","sources":["../../../../src/lib/portal/portal-manifest.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,6CAA6C;IAC7C,aAAa,EAAE,CAAC;SACb,MAAM,CAAC,EAAE,OAAO,EAAE,gCAAgC,EAAE,CAAC;SACrD,QAAQ,CAAC,iCAAiC,CAAC;IAC9C,+CAA+C;IAC/C,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;SACnD,QAAQ,CAAC,mCAAmC,CAAC;IAChD,+CAA+C;IAC/C,SAAS,EAAE,CAAC;SACT,MAAM,CAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;SACjD,QAAQ,EAAE;SACV,QAAQ,CAAC,mCAAmC,CAAC;IAChD,iDAAiD;IACjD,UAAU,EAAE,CAAC;SACV,MAAM,CAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CA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O,EAAE,CAAC;SAC/B,QAAQ,EAAE;SACV,QAAQ,CAAC,uCAAuC,CAAC;CACrD,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,gEAAgE;IAChE,IAAI,EAAE,CAAC;SACJ,MAAM,CAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;SAC5C,QAAQ,CAAC,qDAAqD,CAAC;IAClE,kDAAkD;IAClD,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;SACnD,QAAQ,EAAE;SACV,QAAQ,CAAC,sCAAsC,CAAC;IACnD,uCAAuC;IACvC,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;SACnD,QAAQ,EAAE;SACV,QAAQ,CAAC,2BAA2B,CAAC;IACxC,mEAAmE;IACnE,KAAK,EAAE,yBAAyB;CACjC,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '11.4.0';
2
+ export const version = '12.0.2';
3
3
  //# sourceMappingURL=version.js.map
@@ -7,15 +7,7 @@ export declare const TemplateResourceFileSchema: z.ZodObject<{
7
7
  type: z.ZodLiteral<"file">;
8
8
  path: z.ZodString;
9
9
  target: z.ZodOptional<z.ZodString>;
10
- }, "strip", z.ZodTypeAny, {
11
- path: string;
12
- type: "file";
13
- target?: string | undefined;
14
- }, {
15
- path: string;
16
- type: "file";
17
- target?: string | undefined;
18
- }>;
10
+ }, z.core.$strip>;
19
11
  /**
20
12
  * Zod schema for template resource directories.
21
13
  * Defines the structure for directories in a project template.
@@ -25,49 +17,21 @@ export declare const TemplateResourceDirSchema: z.ZodObject<{
25
17
  path: z.ZodString;
26
18
  target: z.ZodOptional<z.ZodString>;
27
19
  recursive: z.ZodOptional<z.ZodBoolean>;
28
- }, "strip", z.ZodTypeAny, {
29
- path: string;
30
- type: "dir";
31
- target?: string | undefined;
32
- recursive?: boolean | undefined;
33
- }, {
34
- path: string;
35
- type: "dir";
36
- target?: string | undefined;
37
- recursive?: boolean | undefined;
38
- }>;
20
+ }, z.core.$strip>;
39
21
  /**
40
22
  * Union schema for all template resource types.
41
23
  * Supports both file and directory resources with discriminated union.
42
24
  */
43
- export declare const TemplateResourceSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
25
+ export declare const TemplateResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
44
26
  type: z.ZodLiteral<"file">;
45
27
  path: z.ZodString;
46
28
  target: z.ZodOptional<z.ZodString>;
47
- }, "strip", z.ZodTypeAny, {
48
- path: string;
49
- type: "file";
50
- target?: string | undefined;
51
- }, {
52
- path: string;
53
- type: "file";
54
- target?: string | undefined;
55
- }>, z.ZodObject<{
29
+ }, z.core.$strip>, z.ZodObject<{
56
30
  type: z.ZodLiteral<"dir">;
57
31
  path: z.ZodString;
58
32
  target: z.ZodOptional<z.ZodString>;
59
33
  recursive: z.ZodOptional<z.ZodBoolean>;
60
- }, "strip", z.ZodTypeAny, {
61
- path: string;
62
- type: "dir";
63
- target?: string | undefined;
64
- recursive?: boolean | undefined;
65
- }, {
66
- path: string;
67
- type: "dir";
68
- target?: string | undefined;
69
- recursive?: boolean | undefined;
70
- }>]>;
34
+ }, z.core.$strip>], "type">;
71
35
  /**
72
36
  * Zod schema for a single template item.
73
37
  * Defines the structure of individual project templates.
@@ -75,61 +39,17 @@ export declare const TemplateResourceSchema: z.ZodDiscriminatedUnion<"type", [z.
75
39
  export declare const TemplateItemSchema: z.ZodObject<{
76
40
  name: z.ZodString;
77
41
  description: z.ZodString;
78
- resources: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
42
+ resources: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
79
43
  type: z.ZodLiteral<"file">;
80
44
  path: z.ZodString;
81
45
  target: z.ZodOptional<z.ZodString>;
82
- }, "strip", z.ZodTypeAny, {
83
- path: string;
84
- type: "file";
85
- target?: string | undefined;
86
- }, {
87
- path: string;
88
- type: "file";
89
- target?: string | undefined;
90
- }>, z.ZodObject<{
46
+ }, z.core.$strip>, z.ZodObject<{
91
47
  type: z.ZodLiteral<"dir">;
92
48
  path: z.ZodString;
93
49
  target: z.ZodOptional<z.ZodString>;
94
50
  recursive: z.ZodOptional<z.ZodBoolean>;
95
- }, "strip", z.ZodTypeAny, {
96
- path: string;
97
- type: "dir";
98
- target?: string | undefined;
99
- recursive?: boolean | undefined;
100
- }, {
101
- path: string;
102
- type: "dir";
103
- target?: string | undefined;
104
- recursive?: boolean | undefined;
105
- }>]>, "many">;
106
- }, "strip", z.ZodTypeAny, {
107
- resources: ({
108
- path: string;
109
- type: "file";
110
- target?: string | undefined;
111
- } | {
112
- path: string;
113
- type: "dir";
114
- target?: string | undefined;
115
- recursive?: boolean | undefined;
116
- })[];
117
- name: string;
118
- description: string;
119
- }, {
120
- resources: ({
121
- path: string;
122
- type: "file";
123
- target?: string | undefined;
124
- } | {
125
- path: string;
126
- type: "dir";
127
- target?: string | undefined;
128
- recursive?: boolean | undefined;
129
- })[];
130
- name: string;
131
- description: string;
132
- }>;
51
+ }, z.core.$strip>], "type">>;
52
+ }, z.core.$strip>;
133
53
  /**
134
54
  * Zod schema for the complete templates manifest.
135
55
  * Defines the structure of the templates.json file.
@@ -138,140 +58,28 @@ export declare const TemplatesManifestSchema: z.ZodObject<{
138
58
  templates: z.ZodArray<z.ZodObject<{
139
59
  name: z.ZodString;
140
60
  description: z.ZodString;
141
- resources: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
61
+ resources: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
142
62
  type: z.ZodLiteral<"file">;
143
63
  path: z.ZodString;
144
64
  target: z.ZodOptional<z.ZodString>;
145
- }, "strip", z.ZodTypeAny, {
146
- path: string;
147
- type: "file";
148
- target?: string | undefined;
149
- }, {
150
- path: string;
151
- type: "file";
152
- target?: string | undefined;
153
- }>, z.ZodObject<{
65
+ }, z.core.$strip>, z.ZodObject<{
154
66
  type: z.ZodLiteral<"dir">;
155
67
  path: z.ZodString;
156
68
  target: z.ZodOptional<z.ZodString>;
157
69
  recursive: z.ZodOptional<z.ZodBoolean>;
158
- }, "strip", z.ZodTypeAny, {
159
- path: string;
160
- type: "dir";
161
- target?: string | undefined;
162
- recursive?: boolean | undefined;
163
- }, {
164
- path: string;
165
- type: "dir";
166
- target?: string | undefined;
167
- recursive?: boolean | undefined;
168
- }>]>, "many">;
169
- }, "strip", z.ZodTypeAny, {
170
- resources: ({
171
- path: string;
172
- type: "file";
173
- target?: string | undefined;
174
- } | {
175
- path: string;
176
- type: "dir";
177
- target?: string | undefined;
178
- recursive?: boolean | undefined;
179
- })[];
180
- name: string;
181
- description: string;
182
- }, {
183
- resources: ({
184
- path: string;
185
- type: "file";
186
- target?: string | undefined;
187
- } | {
188
- path: string;
189
- type: "dir";
190
- target?: string | undefined;
191
- recursive?: boolean | undefined;
192
- })[];
193
- name: string;
194
- description: string;
195
- }>, "many">;
196
- resources: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
70
+ }, z.core.$strip>], "type">>;
71
+ }, z.core.$strip>>;
72
+ resources: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
197
73
  type: z.ZodLiteral<"file">;
198
74
  path: z.ZodString;
199
75
  target: z.ZodOptional<z.ZodString>;
200
- }, "strip", z.ZodTypeAny, {
201
- path: string;
202
- type: "file";
203
- target?: string | undefined;
204
- }, {
205
- path: string;
206
- type: "file";
207
- target?: string | undefined;
208
- }>, z.ZodObject<{
76
+ }, z.core.$strip>, z.ZodObject<{
209
77
  type: z.ZodLiteral<"dir">;
210
78
  path: z.ZodString;
211
79
  target: z.ZodOptional<z.ZodString>;
212
80
  recursive: z.ZodOptional<z.ZodBoolean>;
213
- }, "strip", z.ZodTypeAny, {
214
- path: string;
215
- type: "dir";
216
- target?: string | undefined;
217
- recursive?: boolean | undefined;
218
- }, {
219
- path: string;
220
- type: "dir";
221
- target?: string | undefined;
222
- recursive?: boolean | undefined;
223
- }>]>, "many">>;
224
- }, "strip", z.ZodTypeAny, {
225
- templates: {
226
- resources: ({
227
- path: string;
228
- type: "file";
229
- target?: string | undefined;
230
- } | {
231
- path: string;
232
- type: "dir";
233
- target?: string | undefined;
234
- recursive?: boolean | undefined;
235
- })[];
236
- name: string;
237
- description: string;
238
- }[];
239
- resources?: ({
240
- path: string;
241
- type: "file";
242
- target?: string | undefined;
243
- } | {
244
- path: string;
245
- type: "dir";
246
- target?: string | undefined;
247
- recursive?: boolean | undefined;
248
- })[] | undefined;
249
- }, {
250
- templates: {
251
- resources: ({
252
- path: string;
253
- type: "file";
254
- target?: string | undefined;
255
- } | {
256
- path: string;
257
- type: "dir";
258
- target?: string | undefined;
259
- recursive?: boolean | undefined;
260
- })[];
261
- name: string;
262
- description: string;
263
- }[];
264
- resources?: ({
265
- path: string;
266
- type: "file";
267
- target?: string | undefined;
268
- } | {
269
- path: string;
270
- type: "dir";
271
- target?: string | undefined;
272
- recursive?: boolean | undefined;
273
- })[] | undefined;
274
- }>;
81
+ }, z.core.$strip>], "type">>>;
82
+ }, z.core.$strip>;
275
83
  /**
276
84
  * Type definitions derived from schemas
277
85
  */
@@ -31,21 +31,21 @@ export type BuildApplicationOptions = {
31
31
  export declare const buildPortal: (opt?: BuildApplicationOptions) => Promise<{
32
32
  pkg: import("../lib/index.js").ResolvedPackage;
33
33
  manifest: {
34
+ name: string;
34
35
  build: {
36
+ templateEntry: string;
37
+ schemaEntry: string;
35
38
  version: string;
36
39
  timestamp: string;
37
40
  commitSha: string;
38
41
  allowedExtensions: string[];
39
- templateEntry: string;
40
- schemaEntry: string;
41
42
  assetPath?: string | undefined;
42
43
  githubRepo?: string | undefined;
43
- projectPage?: string | undefined;
44
44
  annotations?: Record<string, string> | undefined;
45
- config?: Record<string, unknown> | undefined;
45
+ projectPage?: string | undefined;
46
46
  schema?: Record<string, unknown> | undefined;
47
+ config?: Record<string, unknown> | undefined;
47
48
  };
48
- name: string;
49
49
  displayName?: string | undefined;
50
50
  description?: string | undefined;
51
51
  };
@@ -36,21 +36,21 @@ export type ResolvePortalManifestOptions = {
36
36
  */
37
37
  export declare const loadPortalManifest: (options: ResolvePortalManifestOptions) => Promise<{
38
38
  manifest: {
39
+ name: string;
39
40
  build: {
41
+ templateEntry: string;
42
+ schemaEntry: string;
40
43
  version: string;
41
44
  timestamp: string;
42
45
  commitSha: string;
43
46
  allowedExtensions: string[];
44
- templateEntry: string;
45
- schemaEntry: string;
46
47
  assetPath?: string | undefined;
47
48
  githubRepo?: string | undefined;
48
- projectPage?: string | undefined;
49
49
  annotations?: Record<string, string> | undefined;
50
- config?: Record<string, unknown> | undefined;
50
+ projectPage?: string | undefined;
51
51
  schema?: Record<string, unknown> | undefined;
52
+ config?: Record<string, unknown> | undefined;
52
53
  };
53
- name: string;
54
54
  displayName?: string | undefined;
55
55
  description?: string | undefined;
56
56
  };
@@ -32,21 +32,21 @@ export type BundlePortalOptions = {
32
32
  export declare const bundlePortal: (options: BundlePortalOptions) => Promise<{
33
33
  archive: import("adm-zip");
34
34
  manifest: {
35
+ name: string;
35
36
  build: {
37
+ templateEntry: string;
38
+ schemaEntry: string;
36
39
  version: string;
37
40
  timestamp: string;
38
41
  commitSha: string;
39
42
  allowedExtensions: string[];
40
- templateEntry: string;
41
- schemaEntry: string;
42
43
  assetPath?: string | undefined;
43
44
  githubRepo?: string | undefined;
44
- projectPage?: string | undefined;
45
45
  annotations?: Record<string, string> | undefined;
46
- config?: Record<string, unknown> | undefined;
46
+ projectPage?: string | undefined;
47
47
  schema?: Record<string, unknown> | undefined;
48
+ config?: Record<string, unknown> | undefined;
48
49
  };
49
- name: string;
50
50
  displayName?: string | undefined;
51
51
  description?: string | undefined;
52
52
  };
@@ -1,10 +1,11 @@
1
1
  /**
2
2
  * CLI command: `publish`
3
3
  *
4
- * Builds, uploads, and tags a Fusion application for deployment to the Fusion portal.
4
+ * Uploads and tags a Fusion application for deployment to the Fusion portal.
5
5
  *
6
6
  * Features:
7
- * - Bundles the app, uploads it to the Fusion app store, and applies a tag for versioning.
7
+ * - Uploads the app bundle to the Fusion app store and applies a tag for versioning.
8
+ * - Builds the app first if no bundle is provided.
8
9
  * - Supports specifying environment, manifest file, and tag.
9
10
  * - Debug mode and authentication options are supported.
10
11
  *
@@ -9,10 +9,7 @@
9
9
  * - Debug mode and authentication options are supported.
10
10
  *
11
11
  * Usage:
12
- * $ ffc portal publish [bundle] [options]
13
- *
14
- * Arguments:
15
- * [bundle] Path to the portal bundle to upload
12
+ * $ ffc portal publish [options] - Build, upload, and tag portal template
16
13
  *
17
14
  * Options:
18
15
  * -d, --debug Enable debug mode for verbose logging
@@ -23,7 +20,7 @@
23
20
  * Example:
24
21
  * $ ffc portal publish
25
22
  * $ ffc portal publish --env prod --manifest portal.manifest.prod.ts
26
- * $ ffc portal publish --tag latest app.bundle.zip
23
+ * $ ffc portal publish --tag preview
27
24
  *
28
25
  * @see uploadPortalBundle, tagPortal for implementation details
29
26
  */
@@ -9,27 +9,9 @@ export declare const ApiAppConfigSchema: z.ZodObject<{
9
9
  environment: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
10
10
  endpoints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
11
11
  url: z.ZodString;
12
- scopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
13
- }, "strip", z.ZodTypeAny, {
14
- url: string;
15
- scopes: string[];
16
- }, {
17
- url: string;
18
- scopes?: string[] | undefined;
19
- }>>>;
20
- }, "strip", z.ZodTypeAny, {
21
- environment: Record<string, any>;
22
- endpoints?: Record<string, {
23
- url: string;
24
- scopes: string[];
25
- }> | undefined;
26
- }, {
27
- environment?: Record<string, any> | undefined;
28
- endpoints?: Record<string, {
29
- url: string;
30
- scopes?: string[] | undefined;
31
- }> | undefined;
32
- }>;
12
+ scopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
13
+ }, z.core.$strip>>>;
14
+ }, z.core.$strip>;
33
15
  /**
34
16
  * Type representing the validated API application configuration.
35
17
  *