@helix3/helix-cli 0.1.13-helix3.145 → 0.1.13-helix3.147
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.js +48 -0
- package/dist/index.js.map +1 -1
- package/dist/sceneImport/defaultMaterials.d.ts +2 -0
- package/dist/sceneImport/defaultMaterials.js +23 -0
- package/dist/sceneImport/defaultMaterials.js.map +1 -1
- package/dist/sceneImport/multiAsset.d.ts +2 -0
- package/dist/sceneImport/multiAsset.js +3 -0
- package/dist/sceneImport/multiAsset.js.map +1 -1
- package/dist/sceneImport/package.d.ts +6 -0
- package/dist/sceneImport/package.js +12 -4
- package/dist/sceneImport/package.js.map +1 -1
- package/dist/sceneImport/packageReader.js +90 -4
- package/dist/sceneImport/packageReader.js.map +1 -1
- package/dist/sceneImport/publish.d.ts +28 -0
- package/dist/sceneImport/publish.js +37 -2
- package/dist/sceneImport/publish.js.map +1 -1
- package/dist/sceneImport/types.d.ts +17 -0
- package/dist/sceneImport/types.js +20 -0
- package/dist/sceneImport/types.js.map +1 -1
- package/dist/sceneImport/vaultPin.d.ts +180 -0
- package/dist/sceneImport/vaultPin.js +598 -0
- package/dist/sceneImport/vaultPin.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3188,6 +3188,7 @@ sceneSource
|
|
|
3188
3188
|
.requiredOption('--creator <creator>', 'attribution for the source pack')
|
|
3189
3189
|
.requiredOption('--source-url <url>', 'where the pack was obtained')
|
|
3190
3190
|
.option('--default-materials', 'swap imported materials/textures for the shared HELIX default set', false)
|
|
3191
|
+
.option('--vault-pinned', 'this package will be uploaded with `vault-pin`, so the 199-file multipart guard is deferred to publish (where the bundle carries no files at all)', false)
|
|
3191
3192
|
.option('--cell-size <meters>', 'streaming cell size override', parsePositiveFloat)
|
|
3192
3193
|
.action(async (pack, opts) => {
|
|
3193
3194
|
try {
|
|
@@ -3209,6 +3210,7 @@ sceneSource
|
|
|
3209
3210
|
sourceId: opts.sourceId,
|
|
3210
3211
|
receipt,
|
|
3211
3212
|
...(opts.defaultMaterials ? { defaultMaterials: true } : {}),
|
|
3213
|
+
...(opts.vaultPinned ? { vaultPinned: true } : {}),
|
|
3212
3214
|
...(opts.cellSize !== undefined ? { cellSizeM: opts.cellSize } : {}),
|
|
3213
3215
|
});
|
|
3214
3216
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -3217,6 +3219,50 @@ sceneSource
|
|
|
3217
3219
|
fail(`✖ ${err instanceof Error ? err.message : String(err)}`);
|
|
3218
3220
|
}
|
|
3219
3221
|
});
|
|
3222
|
+
sceneSource
|
|
3223
|
+
.command('vault-pin')
|
|
3224
|
+
.description('Publish a compiled package\'s resources to the Vault and rewrite its Scene to pin them, so the published bundle is the Scene document alone')
|
|
3225
|
+
.argument('<package-dir>', 'compiled Scene v2 package directory (from compile-pack or compile)')
|
|
3226
|
+
.option('--kind <kind>', 'Vault kind for every resource (default: inferred per file extension)')
|
|
3227
|
+
.option('--license <license>', 'Vault license: helix_standard, cc0, cc_by, or all_rights_reserved (default: from the import receipt)')
|
|
3228
|
+
.option('--title-prefix <text>', 'prefix for each uploaded asset title')
|
|
3229
|
+
.option('--concurrency <n>', 'parallel uploads, 1-8', parsePositiveFloat)
|
|
3230
|
+
.option('--attempts <n>', 'upload attempts per file before it counts as failed (default 3)', parsePositiveFloat)
|
|
3231
|
+
.option('--skip-unpinnable', 'leave files the Vault refuses as bundle resources and name them in the receipt, instead of failing the run', false)
|
|
3232
|
+
.option('--dry-run', 'report what would be uploaded without sending any bytes or touching the Scene', false)
|
|
3233
|
+
.action(async (packageDir, opts) => {
|
|
3234
|
+
try {
|
|
3235
|
+
const { pinScenePackageToVault } = await Promise.resolve().then(() => __importStar(require('./sceneImport/vaultPin')));
|
|
3236
|
+
const { isVaultAssetKind, isVaultAssetLicense, VAULT_ASSET_LICENSES } = await Promise.resolve().then(() => __importStar(require('./vaultPublish')));
|
|
3237
|
+
if (opts.kind !== undefined && !isVaultAssetKind(opts.kind)) {
|
|
3238
|
+
fail(`✖ --kind must be one of: ${lib_1.VAULT_ASSET_KINDS.join(', ')}`);
|
|
3239
|
+
}
|
|
3240
|
+
if (opts.license !== undefined && !isVaultAssetLicense(opts.license)) {
|
|
3241
|
+
fail(`✖ --license must be one of: ${VAULT_ASSET_LICENSES.join(', ')}`);
|
|
3242
|
+
}
|
|
3243
|
+
const creds = requireAuth();
|
|
3244
|
+
const result = await pinScenePackageToVault({
|
|
3245
|
+
packageDir: (0, node_path_1.resolve)(packageDir),
|
|
3246
|
+
api: lib_1.HelixApi.forCredentials(creds),
|
|
3247
|
+
apiUrl: creds.apiUrl,
|
|
3248
|
+
...(opts.kind !== undefined ? { kind: opts.kind } : {}),
|
|
3249
|
+
...(opts.license !== undefined
|
|
3250
|
+
? { license: opts.license }
|
|
3251
|
+
: {}),
|
|
3252
|
+
...(opts.titlePrefix !== undefined ? { titlePrefix: opts.titlePrefix } : {}),
|
|
3253
|
+
...(opts.concurrency !== undefined ? { concurrency: opts.concurrency } : {}),
|
|
3254
|
+
...(opts.attempts !== undefined ? { attempts: opts.attempts } : {}),
|
|
3255
|
+
skipUnpinnable: opts.skipUnpinnable,
|
|
3256
|
+
dryRun: opts.dryRun,
|
|
3257
|
+
// Progress goes to stderr so stdout stays one parseable JSON document.
|
|
3258
|
+
onProgress: (message) => process.stderr.write(`${message}\n`),
|
|
3259
|
+
});
|
|
3260
|
+
console.log(JSON.stringify(result, null, 2));
|
|
3261
|
+
}
|
|
3262
|
+
catch (err) {
|
|
3263
|
+
fail(err instanceof lib_1.ApiError ? err.render() : `✖ ${err instanceof Error ? err.message : String(err)}`);
|
|
3264
|
+
}
|
|
3265
|
+
});
|
|
3220
3266
|
sceneSource
|
|
3221
3267
|
.command('publish')
|
|
3222
3268
|
.description('Validate and dry-run the native Scene v2 World-build multipart request')
|
|
@@ -3266,6 +3312,8 @@ sceneSource
|
|
|
3266
3312
|
worldId: input.worldId,
|
|
3267
3313
|
profileId: input.profileId,
|
|
3268
3314
|
visibility: input.visibility,
|
|
3315
|
+
bundleResources: input.resources.length,
|
|
3316
|
+
vaultPinnedResources: input.vaultPins.length,
|
|
3269
3317
|
contentDelivery: 'public-content-addressed; --visibility gates World discovery only',
|
|
3270
3318
|
receipt,
|
|
3271
3319
|
}, null, 2));
|