@jxsuite/schema 0.33.0 → 0.35.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.
- package/defs/project-config.schema.ts +31 -1
- package/package.json +3 -3
- package/project-schema.json +37 -3
- package/types.ts +21 -1
|
@@ -68,9 +68,39 @@ export const projectConfigSchema = {
|
|
|
68
68
|
properties: {
|
|
69
69
|
adapter: {
|
|
70
70
|
description: "Platform adapter for deployment-specific output.",
|
|
71
|
-
enum: ["
|
|
71
|
+
enum: ["static", "cloudflare-pages", "cloudflare-workers", "node", "bun"],
|
|
72
72
|
type: "string",
|
|
73
73
|
},
|
|
74
|
+
deploy: {
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
description:
|
|
77
|
+
"Deployment tracking: the hosting project this repo publishes to. Identifiers " +
|
|
78
|
+
"only (no secrets) — safe to commit; Studio uses it to tell whether the publish " +
|
|
79
|
+
"workflow already exists. `adapter` says how the build is packaged; `deploy` says " +
|
|
80
|
+
"where it ships.",
|
|
81
|
+
properties: {
|
|
82
|
+
accountId: {
|
|
83
|
+
description: "Hosting account id (e.g. the Cloudflare account id).",
|
|
84
|
+
type: "string",
|
|
85
|
+
},
|
|
86
|
+
productionUrl: {
|
|
87
|
+
description: "Production URL of the connected hosting project.",
|
|
88
|
+
type: "string",
|
|
89
|
+
},
|
|
90
|
+
projectName: {
|
|
91
|
+
description: "Hosting project name (e.g. the Cloudflare Pages project).",
|
|
92
|
+
pattern: "^[a-z0-9][a-z0-9-]*$",
|
|
93
|
+
type: "string",
|
|
94
|
+
},
|
|
95
|
+
provider: {
|
|
96
|
+
description: "Hosting provider the project is connected to.",
|
|
97
|
+
enum: ["cloudflare-pages"],
|
|
98
|
+
type: "string",
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
required: ["provider", "accountId", "projectName"],
|
|
102
|
+
type: "object",
|
|
103
|
+
},
|
|
74
104
|
format: {
|
|
75
105
|
default: "directory",
|
|
76
106
|
description: "Output format.",
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@webref/css": "^8.6.
|
|
3
|
+
"@webref/css": "^8.6.1",
|
|
4
4
|
"@webref/elements": "^2.7.1",
|
|
5
|
-
"@webref/idl": "^3.81.
|
|
5
|
+
"@webref/idl": "^3.81.2",
|
|
6
6
|
"ajv": "^8.20.0",
|
|
7
7
|
"ajv-formats": "^3.0.1"
|
|
8
8
|
},
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"upgrade": "bunx npm-check-updates -u && bun install"
|
|
42
42
|
},
|
|
43
43
|
"type": "module",
|
|
44
|
-
"version": "0.
|
|
44
|
+
"version": "0.35.0",
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"json-schema-to-ts": "^3.1.1"
|
|
47
47
|
}
|
package/project-schema.json
CHANGED
|
@@ -192,12 +192,46 @@
|
|
|
192
192
|
"adapter": {
|
|
193
193
|
"description": "Platform adapter for deployment-specific output.",
|
|
194
194
|
"enum": [
|
|
195
|
-
"
|
|
196
|
-
"
|
|
197
|
-
"cloudflare"
|
|
195
|
+
"static",
|
|
196
|
+
"cloudflare-pages",
|
|
197
|
+
"cloudflare-workers",
|
|
198
|
+
"node",
|
|
199
|
+
"bun"
|
|
198
200
|
],
|
|
199
201
|
"type": "string"
|
|
200
202
|
},
|
|
203
|
+
"deploy": {
|
|
204
|
+
"additionalProperties": false,
|
|
205
|
+
"description": "Deployment tracking: the hosting project this repo publishes to. Identifiers only (no secrets) — safe to commit; Studio uses it to tell whether the publish workflow already exists. `adapter` says how the build is packaged; `deploy` says where it ships.",
|
|
206
|
+
"properties": {
|
|
207
|
+
"accountId": {
|
|
208
|
+
"description": "Hosting account id (e.g. the Cloudflare account id).",
|
|
209
|
+
"type": "string"
|
|
210
|
+
},
|
|
211
|
+
"productionUrl": {
|
|
212
|
+
"description": "Production URL of the connected hosting project.",
|
|
213
|
+
"type": "string"
|
|
214
|
+
},
|
|
215
|
+
"projectName": {
|
|
216
|
+
"description": "Hosting project name (e.g. the Cloudflare Pages project).",
|
|
217
|
+
"pattern": "^[a-z0-9][a-z0-9-]*$",
|
|
218
|
+
"type": "string"
|
|
219
|
+
},
|
|
220
|
+
"provider": {
|
|
221
|
+
"description": "Hosting provider the project is connected to.",
|
|
222
|
+
"enum": [
|
|
223
|
+
"cloudflare-pages"
|
|
224
|
+
],
|
|
225
|
+
"type": "string"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"required": [
|
|
229
|
+
"provider",
|
|
230
|
+
"accountId",
|
|
231
|
+
"projectName"
|
|
232
|
+
],
|
|
233
|
+
"type": "object"
|
|
234
|
+
},
|
|
201
235
|
"format": {
|
|
202
236
|
"default": "directory",
|
|
203
237
|
"description": "Output format.",
|
package/types.ts
CHANGED
|
@@ -429,6 +429,21 @@ export interface JxClassDef {
|
|
|
429
429
|
[key: string]: unknown;
|
|
430
430
|
}
|
|
431
431
|
|
|
432
|
+
/** The adapters the compiler actually implements (site-loader VALID_ADAPTERS + "static"). */
|
|
433
|
+
export type AdapterId = "static" | "cloudflare-pages" | "cloudflare-workers" | "node" | "bun";
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Deployment tracking (project.json `build.deploy`): the hosting project this repo publishes to.
|
|
437
|
+
* Identifiers only — no secrets — so it travels with the repo and any Studio (local or cloud) can
|
|
438
|
+
* tell whether publishing is set up.
|
|
439
|
+
*/
|
|
440
|
+
export interface DeployConfig {
|
|
441
|
+
provider: "cloudflare-pages";
|
|
442
|
+
accountId: string;
|
|
443
|
+
projectName: string;
|
|
444
|
+
productionUrl?: string | undefined;
|
|
445
|
+
}
|
|
446
|
+
|
|
432
447
|
export interface ProjectConfig {
|
|
433
448
|
name?: string;
|
|
434
449
|
url?: string;
|
|
@@ -437,7 +452,12 @@ export interface ProjectConfig {
|
|
|
437
452
|
$elements?: (string | JxElement)[];
|
|
438
453
|
$head?: JxHeadEntry[];
|
|
439
454
|
$defs?: Record<string, unknown>;
|
|
440
|
-
build?: {
|
|
455
|
+
build?: {
|
|
456
|
+
adapter?: AdapterId | (string & Record<never, never>);
|
|
457
|
+
deploy?: DeployConfig;
|
|
458
|
+
sitemap?: boolean;
|
|
459
|
+
[key: string]: unknown;
|
|
460
|
+
};
|
|
441
461
|
images?: ImageConfig;
|
|
442
462
|
imports?: Record<string, string>;
|
|
443
463
|
contentTypes?: Record<string, ContentTypeDef>;
|