Skip to content

Commit

Permalink
feat: Show app name and publish status as apps are processed
Browse files Browse the repository at this point in the history
Implements #263
  • Loading branch information
Göran Sander committed Jan 2, 2023
1 parent eb9b6f0 commit 31d6bdb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/cloud/cloud-create-thumbnails.js
Expand Up @@ -74,6 +74,9 @@ const processCloudApp = async (appId, saasInstance, options) => {
}
}

// Get app name
const appMetadata = await saasInstance.Get(`apps/${appId}`);

// Configure Enigma.js
const configEnigma = setupEnigmaConnection(appId, options);
const imgDir = options.imagedir;
Expand All @@ -97,6 +100,8 @@ const processCloudApp = async (appId, saasInstance, options) => {

const app = await global.openDoc(appId, '', '', '', false);
logger.info(`Opened app ${appId}`);
logger.info(`App name: "${appMetadata.attributes.name}`);
logger.info(`App is published: ${appMetadata.attributes.published}`);

// Get list of app sheets
const appSheetsCall = {
Expand Down
7 changes: 7 additions & 0 deletions src/lib/qseow/qseow-create-thumbnails.js
Expand Up @@ -75,6 +75,11 @@ const processQSEoWApp = async (appId, g, options) => {
const qrsInteractInstance = new qrsInteract(qseowConfigQrs);
logger.debug(`QSEoW QRS config: ${JSON.stringify(qseowConfigQrs, null, 2)}`);

// Get app top level metadata
logger.debug(`GET app top level metadata: app?filter=id eq ${appId}`);
let appMetadata = await qrsInteractInstance.Get(`app?filter=id eq ${appId}`);
appMetadata = appMetadata.body;

// Get app objet metadata
logger.debug(
`GET tagExcludeSheetAppMetadata: app/object/full?filter=objectType eq 'sheet' and app.id eq ${appId} and tags.name eq '${options.excludeSheetTag}'`
Expand Down Expand Up @@ -107,6 +112,8 @@ const processQSEoWApp = async (appId, g, options) => {

const app = await global.openDoc(appId, '', '', '', false);
logger.info(`Opened app ${appId}`);
logger.info(`App name: "${appMetadata[0].name}"`);
logger.info(`App is published: ${appMetadata[0].published}`);

// Get list of app sheets
const appSheetsCall = {
Expand Down

0 comments on commit 31d6bdb

Please sign in to comment.