@bedrock-core/builder 0.1.2 → 0.3.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/CHANGELOG.md +84 -1
- package/dist/bin/api-library.d.ts +1 -0
- package/dist/bin/api-library.js +10 -0
- package/dist/bin/audit-paths.d.ts +1 -0
- package/dist/bin/audit-paths.js +44 -0
- package/dist/bin/build.js +1 -1
- package/dist/bin/builder.js +13 -2
- package/dist/bin/migrate.js +1 -15
- package/dist/bin/plan.js +2 -2
- package/dist/bin/watch.js +1 -1
- package/dist/package.json +12 -10
- package/dist/schemas/bundler.schema.json +5 -0
- package/dist/schemas/config.schema.json +40 -10
- package/dist/schemas/generator.schema.json +11 -29
- package/dist/schemas/guides.schema.json +0 -5
- package/dist/schemas/i18n.schema.json +0 -5
- package/dist/schemas/pack-manifest.schema.json +294 -0
- package/dist/schemas/ui-compiler.schema.json +0 -15
- package/dist/src/config.d.ts +21 -7
- package/dist/src/config.js +3 -0
- package/dist/src/contract.d.ts +5 -2
- package/dist/src/export.d.ts +7 -5
- package/dist/src/export.js +274 -47
- package/dist/src/migrate.d.ts +1 -1
- package/dist/src/migrate.js +23 -17
- package/dist/src/migration/exports.js +1 -1
- package/dist/src/migration/filters.d.ts +4 -7
- package/dist/src/migration/filters.js +41 -234
- package/dist/src/migration/project.d.ts +1 -2
- package/dist/src/migration/project.js +35 -25
- package/dist/src/migration/types.d.ts +1 -8
- package/dist/src/path-audit.d.ts +29 -0
- package/dist/src/path-audit.js +110 -0
- package/dist/src/plan.d.ts +1 -0
- package/dist/src/plan.js +7 -7
- package/dist/src/plugin-routing.js +1 -1
- package/dist/src/plugins.js +10 -1
- package/dist/src/project.d.ts +1 -3
- package/dist/src/project.js +1 -12
- package/dist/src/regolith.d.ts +3 -3
- package/dist/src/regolith.js +26 -4
- package/dist/src/run.js +86 -38
- package/dist/src/staging.d.ts +4 -0
- package/dist/src/staging.js +305 -0
- package/dist/src/validation.d.ts +1 -1
- package/dist/src/watch.js +48 -29
- package/package.json +41 -20
- package/schemas/bundler.schema.json +5 -0
- package/schemas/config.schema.json +40 -10
- package/schemas/generator.schema.json +11 -29
- package/schemas/guides.schema.json +0 -5
- package/schemas/i18n.schema.json +0 -5
- package/schemas/pack-manifest.schema.json +294 -0
- package/schemas/ui-compiler.schema.json +0 -15
- package/dist/src/migration/local-filter.d.ts +0 -3
- package/dist/src/migration/local-filter.js +0 -20
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "@bedrock-core authored pack manifest",
|
|
4
|
+
"description": "Native manifest v3 fields, inheritance and pack-owned addon metadata.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"if": {
|
|
7
|
+
"not": {
|
|
8
|
+
"required": [
|
|
9
|
+
"extends"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"then": {
|
|
14
|
+
"required": [
|
|
15
|
+
"format_version",
|
|
16
|
+
"header",
|
|
17
|
+
"modules"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"properties": {
|
|
21
|
+
"$schema": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"extends": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"pattern": "^\\.\\.?[/\\\\]"
|
|
27
|
+
},
|
|
28
|
+
"format_version": {
|
|
29
|
+
"const": 3
|
|
30
|
+
},
|
|
31
|
+
"namespace": {
|
|
32
|
+
"$ref": "#/definitions/namespace"
|
|
33
|
+
},
|
|
34
|
+
"thumbnail": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"description": "PNG path relative to the behavior pack or its selected resource pack."
|
|
38
|
+
},
|
|
39
|
+
"optionalDependencies": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"uniqueItems": true,
|
|
42
|
+
"items": {
|
|
43
|
+
"$ref": "#/definitions/dependency"
|
|
44
|
+
},
|
|
45
|
+
"description": "Optional dependencies use the same authored objects as required dependencies and add no native load requirement."
|
|
46
|
+
},
|
|
47
|
+
"header": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": {
|
|
50
|
+
"name": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"minLength": 1
|
|
53
|
+
},
|
|
54
|
+
"description": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
},
|
|
57
|
+
"uuid": {
|
|
58
|
+
"$ref": "#/definitions/uuid"
|
|
59
|
+
},
|
|
60
|
+
"version": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"minLength": 1
|
|
63
|
+
},
|
|
64
|
+
"min_engine_version": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"minLength": 1
|
|
67
|
+
},
|
|
68
|
+
"base_game_version": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
},
|
|
71
|
+
"pack_optimization_version": {
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
"allow_random_seed": {
|
|
75
|
+
"type": "boolean"
|
|
76
|
+
},
|
|
77
|
+
"lock_template_options": {
|
|
78
|
+
"type": "boolean"
|
|
79
|
+
},
|
|
80
|
+
"platform_locked": {
|
|
81
|
+
"type": "boolean"
|
|
82
|
+
},
|
|
83
|
+
"pack_scope": {
|
|
84
|
+
"enum": [
|
|
85
|
+
"world",
|
|
86
|
+
"global",
|
|
87
|
+
"any"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"metadata": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"properties": {
|
|
95
|
+
"authors": {
|
|
96
|
+
"type": "array",
|
|
97
|
+
"items": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"minLength": 1
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"license": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"url": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
"product_type": {
|
|
109
|
+
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"generated_with": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": {
|
|
114
|
+
"$ref": "#/definitions/stringList"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"modules": {
|
|
120
|
+
"type": "array",
|
|
121
|
+
"minItems": 1,
|
|
122
|
+
"items": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"required": [
|
|
125
|
+
"type",
|
|
126
|
+
"uuid"
|
|
127
|
+
],
|
|
128
|
+
"properties": {
|
|
129
|
+
"type": {
|
|
130
|
+
"enum": [
|
|
131
|
+
"data",
|
|
132
|
+
"resources",
|
|
133
|
+
"script",
|
|
134
|
+
"world_template",
|
|
135
|
+
"skin_pack"
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"uuid": {
|
|
139
|
+
"$ref": "#/definitions/uuid"
|
|
140
|
+
},
|
|
141
|
+
"version": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"minLength": 1
|
|
144
|
+
},
|
|
145
|
+
"description": {
|
|
146
|
+
"type": "string"
|
|
147
|
+
},
|
|
148
|
+
"language": {
|
|
149
|
+
"const": "javascript"
|
|
150
|
+
},
|
|
151
|
+
"entry": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"pattern": "^scripts/.+\\.(js|ts|tsx|mts|cts)$",
|
|
154
|
+
"description": "Authored script path. Builder compiles TypeScript entries and exports the corresponding .js path."
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"dependencies": {
|
|
160
|
+
"type": "array",
|
|
161
|
+
"items": {
|
|
162
|
+
"$ref": "#/definitions/dependency"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"capabilities": {
|
|
166
|
+
"$ref": "#/definitions/stringList"
|
|
167
|
+
},
|
|
168
|
+
"has_education_metadata": {
|
|
169
|
+
"type": "boolean"
|
|
170
|
+
},
|
|
171
|
+
"subpacks": {
|
|
172
|
+
"type": "array",
|
|
173
|
+
"items": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"required": ["folder_name", "name", "memory_performance_tier"],
|
|
176
|
+
"properties": {
|
|
177
|
+
"folder_name": { "type": "string" },
|
|
178
|
+
"name": { "type": "string" },
|
|
179
|
+
"memory_performance_tier": { "type": "integer", "minimum": 0, "maximum": 5 }
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"definitions": {
|
|
185
|
+
"stringList": {
|
|
186
|
+
"type": "array",
|
|
187
|
+
"items": { "type": "string" }
|
|
188
|
+
},
|
|
189
|
+
"namespace": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"pattern": "^[a-z0-9_]+$",
|
|
192
|
+
"not": {
|
|
193
|
+
"const": "minecraft"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"uuid": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"pattern": "^[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$"
|
|
199
|
+
},
|
|
200
|
+
"dependency": {
|
|
201
|
+
"type": "object",
|
|
202
|
+
"not": {
|
|
203
|
+
"anyOf": [
|
|
204
|
+
{
|
|
205
|
+
"required": [
|
|
206
|
+
"pack"
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"required": [
|
|
211
|
+
"module"
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
"properties": {
|
|
217
|
+
"uuid": {
|
|
218
|
+
"$ref": "#/definitions/uuid"
|
|
219
|
+
},
|
|
220
|
+
"namespace": {
|
|
221
|
+
"$ref": "#/definitions/namespace"
|
|
222
|
+
},
|
|
223
|
+
"module_name": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"minLength": 1
|
|
226
|
+
},
|
|
227
|
+
"optional": {
|
|
228
|
+
"type": "boolean"
|
|
229
|
+
},
|
|
230
|
+
"version": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"minLength": 1
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"if": { "required": ["optional"] },
|
|
236
|
+
"then": { "required": ["module_name"] },
|
|
237
|
+
"oneOf": [
|
|
238
|
+
{
|
|
239
|
+
"required": [
|
|
240
|
+
"namespace"
|
|
241
|
+
],
|
|
242
|
+
"not": {
|
|
243
|
+
"anyOf": [
|
|
244
|
+
{
|
|
245
|
+
"required": [
|
|
246
|
+
"uuid"
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"required": [
|
|
251
|
+
"module_name"
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"required": [
|
|
259
|
+
"uuid"
|
|
260
|
+
],
|
|
261
|
+
"not": {
|
|
262
|
+
"required": [
|
|
263
|
+
"module_name"
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"required": [
|
|
269
|
+
"module_name"
|
|
270
|
+
],
|
|
271
|
+
"not": {
|
|
272
|
+
"required": [
|
|
273
|
+
"uuid"
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
"if": {
|
|
277
|
+
"properties": {
|
|
278
|
+
"module_name": {
|
|
279
|
+
"pattern": "^@minecraft/"
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"then": {
|
|
284
|
+
"not": {
|
|
285
|
+
"required": [
|
|
286
|
+
"namespace"
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
]
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
@@ -4,25 +4,10 @@
|
|
|
4
4
|
"type": "object",
|
|
5
5
|
"additionalProperties": false,
|
|
6
6
|
"properties": {
|
|
7
|
-
"experimentalOre": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"additionalProperties": false,
|
|
10
|
-
"description": "Asset preparation for Experimental_OreUI screens; ignored when the build has none.",
|
|
11
|
-
"properties": {
|
|
12
|
-
"clientRoot": { "type": "string", "pattern": "\\S", "description": "Windows Minecraft Content directory; defaults to a matching installed client." },
|
|
13
|
-
"resourceRoots": { "type": "array", "items": { "type": "string", "pattern": "\\S" }, "description": "Fallback resource-pack roots after the selected RP, in priority order. Paths resolve from the project." },
|
|
14
|
-
"dynamicTextures": { "type": "array", "uniqueItems": true, "items": { "type": "string", "pattern": "^textures/(?:[A-Za-z0-9_-]+/)*[A-Za-z0-9_-]+(?:\\.png)?$" }, "description": "Pack-local PNG textures available to live Ore images." }
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
7
|
"debug": {
|
|
18
8
|
"type": "boolean",
|
|
19
9
|
"description": "Stage override for the profile debug setting."
|
|
20
10
|
},
|
|
21
|
-
"namespace": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"pattern": "^[a-z0-9_]+$",
|
|
24
|
-
"description": "Defaults to the project namespace."
|
|
25
|
-
},
|
|
26
11
|
"testMetadata": {
|
|
27
12
|
"type": "boolean",
|
|
28
13
|
"default": false
|
package/dist/src/config.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { builtinPlugins } from './builtins.ts';
|
|
|
2
2
|
export type { JsonFormatting } from '@bedrock-core/builder-plugin';
|
|
3
3
|
import type { JsonFormatting } from '@bedrock-core/builder-plugin';
|
|
4
4
|
import type { PackLinkOverrides } from '@bedrock-core/builder-plugin';
|
|
5
|
+
import type { ContentValidationMode } from '@bedrock-core/builder-validation';
|
|
5
6
|
/** Built-in transformation names, in execution order. */
|
|
6
7
|
export type StageName = keyof typeof builtinPlugins;
|
|
7
8
|
/** JSON-compatible options passed unchanged to a stage or module plugin. */
|
|
@@ -13,10 +14,18 @@ export interface ScriptFolders {
|
|
|
13
14
|
BP?: string;
|
|
14
15
|
RP?: string;
|
|
15
16
|
}
|
|
16
|
-
/** Standalone Node
|
|
17
|
-
export
|
|
18
|
-
|
|
17
|
+
/** Standalone Node entry run once in a temporary BP/RP/data workspace. */
|
|
18
|
+
export type NodePluginDefinition = (
|
|
19
|
+
/** Entry file relative to filterDir, or an absolute file path. */
|
|
20
|
+
{
|
|
19
21
|
script: string;
|
|
22
|
+
nodeModule?: never;
|
|
23
|
+
}
|
|
24
|
+
/** Installed package or exported subpath resolved from filterDir. */
|
|
25
|
+
| {
|
|
26
|
+
nodeModule: string;
|
|
27
|
+
script?: never;
|
|
28
|
+
}) & {
|
|
20
29
|
/** Definition directory relative to config.json; defaults to projectRoot. */
|
|
21
30
|
filterDir?: string;
|
|
22
31
|
/** Configured pack IDs exposed under conventional folder names. Omission infers an unambiguous set. */
|
|
@@ -27,7 +36,7 @@ export interface NodePluginDefinition {
|
|
|
27
36
|
persistData?: boolean;
|
|
28
37
|
/** Node flags placed before the entry file. */
|
|
29
38
|
nodeArguments?: string[];
|
|
30
|
-
}
|
|
39
|
+
};
|
|
31
40
|
/** Native module with host-owned owner restrictions and dependency overrides. */
|
|
32
41
|
export interface ModulePluginDefinition {
|
|
33
42
|
module: string;
|
|
@@ -65,10 +74,16 @@ export interface BuildProfile {
|
|
|
65
74
|
stages?: Partial<Record<StageName, StageSelection>>;
|
|
66
75
|
/** Reuse verified compilation and validation results; defaults to true. */
|
|
67
76
|
cache?: boolean;
|
|
77
|
+
/** Document type validation mode, defaulting to warn. JSON syntax and pack manifests always validate. */
|
|
78
|
+
validation?: ContentValidationMode;
|
|
79
|
+
/** Creator Tools CLI validation mode, defaulting to skip. */
|
|
80
|
+
creatorToolsValidation?: ContentValidationMode;
|
|
68
81
|
/** Invocations after prepare, before/after enabled stages, or before export. */
|
|
69
82
|
steps?: PluginStep[];
|
|
70
83
|
/** Destination for every configured pack ID, relative to config.json or absolute. */
|
|
71
84
|
export?: Record<string, string>;
|
|
85
|
+
/** Publish declared addon API exports; defaults to dist/api, or false to disable. */
|
|
86
|
+
api?: string | false;
|
|
72
87
|
/** Debounce interval and additional project-relative inputs for watch mode. */
|
|
73
88
|
watch?: {
|
|
74
89
|
debounceMs?: number;
|
|
@@ -81,8 +96,6 @@ export interface ProjectConfig {
|
|
|
81
96
|
$schema?: string;
|
|
82
97
|
/** Target Minecraft version used by participating stages. */
|
|
83
98
|
targetVersion: string;
|
|
84
|
-
/** Default namespace for generated content. */
|
|
85
|
-
namespace: string;
|
|
86
99
|
/** Human-readable project name. */
|
|
87
100
|
name: string;
|
|
88
101
|
/** Optional project description. */
|
|
@@ -98,8 +111,9 @@ export interface ProjectConfig {
|
|
|
98
111
|
bedrockCore: {
|
|
99
112
|
formatVersion: '1.0.0';
|
|
100
113
|
plugins?: Record<string, PluginDefinition>;
|
|
101
|
-
/**
|
|
114
|
+
/** Extra authored inputs and omitted paths, relative to config.json. */
|
|
102
115
|
staging?: {
|
|
116
|
+
include?: string[];
|
|
103
117
|
exclude?: string[];
|
|
104
118
|
};
|
|
105
119
|
profiles: Record<string, BuildProfile>;
|
package/dist/src/config.js
CHANGED
|
@@ -34,6 +34,9 @@ export function validatePluginDefinition(definition, name) {
|
|
|
34
34
|
* @throws If metadata or builder fields fail schema validation.
|
|
35
35
|
*/
|
|
36
36
|
export function validateConfig(config) {
|
|
37
|
+
if (config !== null && typeof config === 'object' && Object.hasOwn(config, 'namespace')) {
|
|
38
|
+
throw new Error('Invalid project configuration: declare namespace in each pack manifest.json');
|
|
39
|
+
}
|
|
37
40
|
if (!validate(config)) {
|
|
38
41
|
const details = (validate.errors ?? [])
|
|
39
42
|
.map(error => `${error.instancePath || '/'} ${error.message}`)
|
package/dist/src/contract.d.ts
CHANGED
|
@@ -19,12 +19,15 @@ export interface BuildOptions {
|
|
|
19
19
|
/** Additional final check after artifact checks, before manifest/content validation and export. */
|
|
20
20
|
validateArtifacts?: (context: BuildContext) => void | Promise<void>;
|
|
21
21
|
}
|
|
22
|
+
|
|
22
23
|
/** Successful build report containing durable destinations and IDs, without temporary paths. */
|
|
23
24
|
export interface BuildResult {
|
|
24
|
-
/** Final JSON syntax
|
|
25
|
+
/** Final JSON syntax and document type validation coverage. */
|
|
25
26
|
readonly validation: ContentValidationResult;
|
|
26
27
|
/** Pack IDs mapped to their published absolute directories. */
|
|
27
28
|
readonly outputPaths: Readonly<Record<string, string>>;
|
|
29
|
+
/** Published portable addon API package, when emitted by the provider build. */
|
|
30
|
+
readonly apiOutput?: string;
|
|
28
31
|
/** Profile used for the build. */
|
|
29
32
|
readonly profile: string;
|
|
30
33
|
/** Participating stage statuses and optional explanations. */
|
|
@@ -34,7 +37,7 @@ export interface BuildResult {
|
|
|
34
37
|
/** Individual compiler execution and reuse records. */
|
|
35
38
|
readonly compilations: { id: string; status: 'executed' | 'cached' }[];
|
|
36
39
|
/** Artifact identities and owners; workspace file paths are intentionally omitted. */
|
|
37
|
-
readonly artifacts: Pick<Artifact, 'id' | 'owner' | 'importAs' | 'pack'>[];
|
|
40
|
+
readonly artifacts: Pick<Artifact, 'id' | 'owner' | 'importAs' | 'pack' | 'assetRegistry'>[];
|
|
38
41
|
/** Final manifest classifications with published pack paths. */
|
|
39
42
|
readonly packs: PackInfo[];
|
|
40
43
|
}
|
package/dist/src/export.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface ExportedPack {
|
|
|
16
16
|
/** Absolute published directory. */
|
|
17
17
|
path: string;
|
|
18
18
|
}
|
|
19
|
-
type PublishPacks = (packs: Record<string, string>, signal?: AbortSignal) => Promise<ExportedPack[]>;
|
|
19
|
+
type PublishPacks = (packs: Record<string, string>, signal?: AbortSignal, apiPackage?: string) => Promise<ExportedPack[]>;
|
|
20
20
|
/**
|
|
21
21
|
* Expand `%NAME%`, `$NAME` and `${NAME}`, then resolve destinations relative to the project.
|
|
22
22
|
* @param project Absolute directory containing config.json.
|
|
@@ -28,20 +28,22 @@ type PublishPacks = (packs: Record<string, string>, signal?: AbortSignal) => Pro
|
|
|
28
28
|
* @throws For missing variables/pack IDs, overlapping paths or unsafe source destinations.
|
|
29
29
|
*/
|
|
30
30
|
export declare function resolveExportPaths(project: string, packs: Record<string, string>, selection: Record<string, string>, environment?: NodeJS.ProcessEnv): Record<string, string>;
|
|
31
|
+
/** Resolve a dedicated API package destination with the pack publication safety rules. */
|
|
32
|
+
export declare function resolveApiPackagePath(project: string, packs: Record<string, string>, paths: Record<string, string>, destination: string): string;
|
|
31
33
|
/**
|
|
32
34
|
* Hold destination locks while the callback prepares and publishes validated packs.
|
|
33
35
|
* @param paths Dedicated nonoverlapping pack destination directories.
|
|
34
36
|
* @param build Callback receiving the guarded publication function.
|
|
35
37
|
* @returns The callback result, with destination locks released on completion.
|
|
36
|
-
* @remarks
|
|
38
|
+
* @remarks Locks are keyed by destination in the OS temporary directory. The callback owns preparation and any additional validation.
|
|
37
39
|
* @throws If a destination is unsafe or already locked, or the callback fails.
|
|
38
40
|
*/
|
|
39
|
-
export declare function withExportPaths<T>(paths: Record<string, string>, build: (publish: PublishPacks) => Promise<T
|
|
41
|
+
export declare function withExportPaths<T>(paths: Record<string, string>, build: (publish: PublishPacks) => Promise<T>, apiPath?: string): Promise<T>;
|
|
40
42
|
/**
|
|
41
43
|
* Publish pack folders with manifest checks, locks and rollback, without the build runner.
|
|
42
44
|
* @returns Published pack IDs and absolute destination directories.
|
|
43
|
-
* @remarks
|
|
44
|
-
* @throws If manifest checks or publication fail
|
|
45
|
+
* @remarks Updates files in place without renaming pack roots. Snapshots and locks stay in the OS temporary directory. Use validatePackContent to check pack JSON before export.
|
|
46
|
+
* @throws If manifest checks or publication fail. Failed rollback reports a retained recovery directory.
|
|
45
47
|
*/
|
|
46
48
|
export declare function exportPacks({ packs, paths, signal, environment }: ExportOptions): Promise<ExportedPack[]>;
|
|
47
49
|
export {};
|