-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreateAndUploadApp.js
More file actions
22 lines (20 loc) · 951 Bytes
/
Copy pathcreateAndUploadApp.js
File metadata and controls
22 lines (20 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const AppCreator = require('./lib/appCreator');
const Authenticator = require('./lib/authenticator');
const configFile = require('./config/index');
const logger = require('./lib/logger');
const authenticator = new Authenticator(configFile.forge.clientId, configFile.forge.clientSecret);
authenticator.getForgeOAuth2TwoLeggedObject((err, forgeOAuth2TwoLegged) => {
if (err) {
logger.log('Error while initializing forgeOAuth2TwoLegged object: ', err);
process.exit(1);
}
const ExportToFBXRunnerInstance = new AppCreator(forgeOAuth2TwoLegged, configFile);
ExportToFBXRunnerInstance.createApp({
appId: configFile.designAutomation.appId,
appAlias: configFile.designAutomation.appAlias,
engineId: configFile.designAutomation.engineId,
clientId: configFile.forge.clientId,
clientSecret: configFile.forge.clientSecret,
pathToAppPackage: './appBundle/export.bundle'
});
});