Skip to content

Commit 81ed1e7

Browse files
ramya18101mgyarmathy
authored andcommitted
Support for ACUL:GA (auth0#1209)
* streamline rendering update payload construction and remove under EA * Add screenRenderers to prompts in context tests * Update logging to check for non-empty list before displaying msg * Remove ACUL from EA_FEATURES array
1 parent 16d7dd3 commit 81ed1e7

File tree

3 files changed

+15
-24
lines changed

3 files changed

+15
-24
lines changed

src/context/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const nonPrimitiveProps: (keyof Config)[] = [
2626
'INCLUDED_PROPS',
2727
];
2828

29-
const EA_FEATURES = ['ACUL'];
29+
const EA_FEATURES = [];
3030

3131
export const setupContext = async (
3232
config: Config,
@@ -144,7 +144,7 @@ export const setupContext = async (
144144
: 'features [' + EA_FEATURES.join(',') + '] are'
145145
} enabled. These are in a pre-release state and may change in future release.`
146146
);
147-
} else {
147+
} else if (EA_FEATURES.length > 0) {
148148
log.info(
149149
'To enable experimental early access features use --experimental_ea flag or set AUTH0_EXPERIMENTAL_EA=true in configuration JSON.'
150150
);

src/tools/auth0/handlers/prompts.ts

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -351,15 +351,11 @@ export default class PromptsHandler extends DefaultHandler {
351351
partials,
352352
};
353353

354-
const includeExperimentalEA = this.config('AUTH0_EXPERIMENTAL_EA') || false;
355-
356-
if (includeExperimentalEA) {
357-
try {
358-
const { data } = await this.client.prompts.getAllRenderingSettings();
359-
prompts.screenRenderers = data;
360-
} catch (error) {
361-
log.warn(`Unable to fetch screen renderers: ${error}`);
362-
}
354+
try {
355+
const { data } = await this.client.prompts.getAllRenderingSettings();
356+
prompts.screenRenderers = data;
357+
} catch (error) {
358+
log.warn(`Unable to fetch screen renderers: ${error}`);
363359
}
364360

365361
return prompts;
@@ -575,19 +571,11 @@ export default class PromptsHandler extends DefaultHandler {
575571
screenRenderer;
576572
if (!prompt || !screen) return;
577573

578-
let updatePayload: PatchRenderingRequest = {};
579-
580-
if (rendering_mode === PatchRenderingRequestRenderingModeEnum.standard) {
581-
updatePayload = {
582-
rendering_mode,
583-
};
584-
} else {
585-
updatePayload = {
586-
...updatePrams,
587-
rendering_mode,
588-
default_head_tags_disabled: default_head_tags_disabled || undefined,
589-
};
590-
}
574+
const updatePayload = {
575+
...updatePrams,
576+
rendering_mode,
577+
default_head_tags_disabled: default_head_tags_disabled || undefined,
578+
};
591579

592580
try {
593581
await this.client.prompts.updateRendering(

test/context/yaml/context.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ describe('#YAML context validation', () => {
303303
prompts: {
304304
customText: {},
305305
partials: {},
306+
screenRenderers: [],
306307
},
307308
customDomains: [],
308309
themes: [],
@@ -431,6 +432,7 @@ describe('#YAML context validation', () => {
431432
prompts: {
432433
customText: {},
433434
partials: {},
435+
screenRenderers: [],
434436
},
435437
customDomains: [],
436438
themes: [],
@@ -559,6 +561,7 @@ describe('#YAML context validation', () => {
559561
prompts: {
560562
customText: {},
561563
partials: {},
564+
screenRenderers: [],
562565
},
563566
logStreams: [],
564567
customDomains: [],

0 commit comments

Comments
 (0)