Created
October 2, 2021 00:57
-
-
Save nikki93/bd3fdaa4fc1fb4e292d19fcd4d71d7c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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