Skip to content

Instantly share code, notes, and snippets.

@nikki93
Created October 2, 2021 00:57
Show Gist options
  • Save nikki93/bd3fdaa4fc1fb4e292d19fcd4d71d7c3 to your computer and use it in GitHub Desktop.
Save nikki93/bd3fdaa4fc1fb4e292d19fcd4d71d7c3 to your computer and use it in GitHub Desktop.
import * as fs from 'fs';
import * as scm from './src/utils/sceneCreatorMigrations';
const data = JSON.parse(fs.readFileSync(process.argv[1]).toString());
const context = {
sceneCreatorVersion: 80,
};
(async () => {
for (const bp of data.templates) {
if (bp.actorBlueprint) {
bp.actorBlueprint.components = await scm.migrateComponentsAsync(
bp.actorBlueprint.components,
context,
scm.MigrationType.UP
);
}
}
})();
console.log(JSON.stringify(data, null, 2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment