feat(plugins): bundle project scaffold marketplace plugin
This commit is contained in:
@@ -12,6 +12,8 @@ import {
|
||||
CODE_OWNED_PLUGIN_PERMISSION_IDS,
|
||||
GAME_RESOURCE_BUNDLED_RELEASE_ID,
|
||||
GAME_RESOURCE_PLUGIN_ID,
|
||||
PROJECT_SCAFFOLD_BUNDLED_RELEASE_ID,
|
||||
PROJECT_SCAFFOLD_PLUGIN_ID,
|
||||
DATA_SERVICE_CAPABILITY_IDS,
|
||||
DATA_SERVICE_OPERATION_DEFINITIONS,
|
||||
DATA_SERVICE_PLUGIN_ID,
|
||||
@@ -35,6 +37,7 @@ import {
|
||||
export const BUNDLED_CODING_PLUGIN_ROOTS = Object.freeze([
|
||||
'data-service',
|
||||
'game-resource',
|
||||
'project-scaffold',
|
||||
] as const);
|
||||
|
||||
const BUNDLED_CODING_PLUGIN_METADATA = Object.freeze({
|
||||
@@ -52,6 +55,13 @@ const BUNDLED_CODING_PLUGIN_METADATA = Object.freeze({
|
||||
releaseId: GAME_RESOURCE_BUNDLED_RELEASE_ID,
|
||||
bundledV2: true,
|
||||
}),
|
||||
'project-scaffold': Object.freeze({
|
||||
pluginId: PROJECT_SCAFFOLD_PLUGIN_ID,
|
||||
runtimeKind: 'skill_only' as const,
|
||||
acquisitionMode: 'user_acquired' as const,
|
||||
releaseId: PROJECT_SCAFFOLD_BUNDLED_RELEASE_ID,
|
||||
bundledV2: true,
|
||||
}),
|
||||
});
|
||||
|
||||
const CAPABILITY_MANIFEST_RELATIVE_PATH = 'com.makelore/capability.json';
|
||||
@@ -722,8 +732,11 @@ function trustedMetadata(
|
||||
if (options.bundledV2 && !bundledV2) {
|
||||
fail(filePath, 'trusted metadata.bundledV2', 'is valid only for schema 2 packages');
|
||||
}
|
||||
if (bundledV2 && (runtimeKind !== 'platform_hosted' || releaseId === null)) {
|
||||
fail(filePath, 'trusted metadata.bundledV2', 'requires a hosted runtime and fixed Release ID');
|
||||
if (bundledV2 && (runtimeKind !== 'platform_hosted' && runtimeKind !== 'skill_only')) {
|
||||
fail(filePath, 'trusted metadata.bundledV2', 'requires a distributed runtime');
|
||||
}
|
||||
if (bundledV2 && releaseId === null) {
|
||||
fail(filePath, 'trusted metadata.bundledV2', 'requires a fixed Release ID');
|
||||
}
|
||||
const defaultProvenance: CodingPluginPackageProvenance = {
|
||||
source: schemaVersion === 1 || bundledV2 ? 'bundled' : 'marketplace',
|
||||
|
||||
Reference in New Issue
Block a user