From a7913dec59be216537b9ed917a795e768bbc23b5 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Thu, 11 Feb 2016 13:38:44 +0200 Subject: [PATCH] Upgrade to Angular 2.0.0-beta.3 + refactoring --- demo/index.html | 2 +- demo/main.js | 2 + karma.conf.js | 4 +- lib/components/ApiInfo/api-info.spec.js | 1 - lib/components/ApiLogo/api-logo.js | 2 +- .../JsonSchema/json-schema-lazy.spec.js | 2 - lib/components/JsonSchema/json-schema.spec.js | 1 - lib/components/Method/method.spec.js | 1 - lib/components/Redoc/redoc.js | 23 +++++--- lib/components/SideMenu/side-menu.js | 6 +- lib/components/SideMenu/side-menu.spec.js | 1 - lib/index.js | 3 - lib/options.js | 16 ++--- lib/utils/pipes.js | 3 +- package.json | 2 +- system.config.js | 58 +++++++++---------- tests/helpers.js | 15 ++--- tests/setup.js | 13 +++++ 18 files changed, 82 insertions(+), 73 deletions(-) create mode 100644 tests/setup.js diff --git a/demo/index.html b/demo/index.html index 1d480d20..c189d992 100644 --- a/demo/index.html +++ b/demo/index.html @@ -17,7 +17,7 @@ - + diff --git a/demo/main.js b/demo/main.js index a7fd542a..836eaa45 100644 --- a/demo/main.js +++ b/demo/main.js @@ -8,4 +8,6 @@ Redoc.init(schemaUrlInput.value); return false; }) + + //window.redocDebugMode = true; })(); diff --git a/karma.conf.js b/karma.conf.js index a913a3fd..9d1d480d 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -49,12 +49,12 @@ module.exports = function (config) { 'node_modules/zone.js/dist/long-stack-trace-zone.js', 'node_modules/zone.js/dist/jasmine-patch.js', 'node_modules/babel-polyfill/dist/polyfill.js', - 'node_modules/reflect-metadata/Reflect.js' + './node_modules/reflect-metadata/Reflect.js' ], jspm: { config: 'system.config.js', - loadFiles: ['tests/unit/*.spec.js', 'tests/helpers.js', 'lib/**/*.js'], + loadFiles: ['tests/setup.js', 'tests/helpers.js', 'tests/unit/*.spec.js', 'lib/**/*.js'], serveFiles: ['tests/schemas/**/*.json','tests/schemas/**/*.yml', 'lib/**/*.html', '.tmp/lib/**/*.css'], nocache: true }, diff --git a/lib/components/ApiInfo/api-info.spec.js b/lib/components/ApiInfo/api-info.spec.js index d9f9e95f..83abf877 100644 --- a/lib/components/ApiInfo/api-info.spec.js +++ b/lib/components/ApiInfo/api-info.spec.js @@ -56,7 +56,6 @@ describe('Redoc components', () => { @Component({selector: 'test-app'}) @View({ directives: [ApiInfo], - providers: [SchemaManager], template: `` }) diff --git a/lib/components/ApiLogo/api-logo.js b/lib/components/ApiLogo/api-logo.js index a4e086bd..46db79dd 100644 --- a/lib/components/ApiLogo/api-logo.js +++ b/lib/components/ApiLogo/api-logo.js @@ -7,7 +7,7 @@ import {RedocComponent, BaseComponent} from '../base'; styleUrls: ['./lib/components/ApiLogo/api-logo.css'], templateUrl: './lib/components/ApiLogo/api-logo.html' }) -export default class ApiInfo extends BaseComponent { +export default class ApiLogo extends BaseComponent { constructor(schemaMgr) { super(schemaMgr); } diff --git a/lib/components/JsonSchema/json-schema-lazy.spec.js b/lib/components/JsonSchema/json-schema-lazy.spec.js index 0c0a1205..65535b52 100644 --- a/lib/components/JsonSchema/json-schema-lazy.spec.js +++ b/lib/components/JsonSchema/json-schema-lazy.spec.js @@ -30,7 +30,6 @@ describe('Redoc components', () => { beforeEachProviders(() => [ provide(SchemaManager, {useValue: schemaMgr}), provide(BrowserDomAdapter, {useClass: BrowserDomAdapter}), - provide('OPTION_NAMES', {useValue: []}), provide(OptionsManager, {useClass: OptionsManager}) ]); beforeEach(inject([TestComponentBuilder, DynamicComponentLoader], (tcb, dcl) => { @@ -84,7 +83,6 @@ describe('Redoc components', () => { @Component({selector: 'test-app'}) @View({ directives: [JsonSchemaLazy], - providers: [SchemaManager, DynamicComponentLoader], template: `` }) diff --git a/lib/components/JsonSchema/json-schema.spec.js b/lib/components/JsonSchema/json-schema.spec.js index 8f2794c9..02e54491 100644 --- a/lib/components/JsonSchema/json-schema.spec.js +++ b/lib/components/JsonSchema/json-schema.spec.js @@ -23,7 +23,6 @@ describe('Redoc components', () => { let fixture; beforeEachProviders(() => [ provide(SchemaManager, {useValue: schemaMgr}), - provide('OPTION_NAMES', {useValue: []}), provide(OptionsManager, {useClass: OptionsManager}) ]); beforeEach(inject([TestComponentBuilder], (tcb) => { diff --git a/lib/components/Method/method.spec.js b/lib/components/Method/method.spec.js index 3e97e356..9e5aee33 100644 --- a/lib/components/Method/method.spec.js +++ b/lib/components/Method/method.spec.js @@ -23,7 +23,6 @@ describe('Redoc components', () => { beforeEachProviders(() => [ provide(SchemaManager, {useValue: new SchemaManager()}), provide(BrowserDomAdapter, {useClass: BrowserDomAdapter}), - provide('OPTION_NAMES', {useValue: []}), provide(OptionsManager, {useClass: OptionsManager}) ]); beforeEach(injectAsync([TestComponentBuilder, SchemaManager], (tcb, schemaMgr) => { diff --git a/lib/components/Redoc/redoc.js b/lib/components/Redoc/redoc.js index 9a298d59..4faa1353 100644 --- a/lib/components/Redoc/redoc.js +++ b/lib/components/Redoc/redoc.js @@ -1,10 +1,9 @@ 'use strict'; -import {ChangeDetectionStrategy, provide} from 'angular2/core'; +import {ChangeDetectionStrategy, provide, enableProdMode} from 'angular2/core'; import {ElementRef} from 'angular2/core'; import {BrowserDomAdapter, bootstrap} from 'angular2/platform/browser'; import detectScollParent from 'scrollparent'; - import {RedocComponent, BaseComponent} from '../base'; import SchemaManager from '../../utils/SchemaManager'; @@ -18,15 +17,14 @@ import {redocEvents} from '../../events'; import './redoc-loading-styles.css!css'; -let dom = new BrowserDomAdapter(); +var dom = new BrowserDomAdapter(); +var _modeLocked = false; @RedocComponent({ selector: 'redoc', providers: [ SchemaManager, - BrowserDomAdapter, - provide('OPTION_NAMES', {useValue: new Set(['scrollYOffset', 'disableLazySchemas'])}), - provide(OptionsManager, {useClass: OptionsManager}) + BrowserDomAdapter ], templateUrl: './lib/components/Redoc/redoc.html', styleUrls: ['./lib/components/Redoc/redoc.css'], @@ -60,14 +58,23 @@ export default class Redoc extends BaseComponent { } static init(schemaUrl, options) { + var optionsMgr = new OptionsManager(); + optionsMgr.options = options; + var providers = [ + provide(OptionsManager, {useValue: optionsMgr}) + ]; + if (Redoc.appRef) { Redoc.dispose(); } Redoc.showLoadingAnimation(); return SchemaManager.instance().load(schemaUrl) .then(() => { - (new OptionsManager()).options = options; - return bootstrap(Redoc); + if (!_modeLocked && !optionsMgr.options.debugMode) { + enableProdMode(); + _modeLocked = true; + } + return bootstrap(Redoc, providers); }) .then( (appRef) => { diff --git a/lib/components/SideMenu/side-menu.js b/lib/components/SideMenu/side-menu.js index 00e42ba9..a3791bee 100644 --- a/lib/components/SideMenu/side-menu.js +++ b/lib/components/SideMenu/side-menu.js @@ -32,12 +32,10 @@ const INVIEW_POSITION = { export default class SideMenu extends BaseComponent { constructor(schemaMgr, elementRef, dom, zone, optionsMgr) { super(schemaMgr); + this.$element = elementRef.nativeElement; this.dom = dom; this.options = optionsMgr.options; this.$scrollParent = this.options.$scrollParent; - this.$mobileNav = dom.querySelector(elementRef.nativeElement, '.mobile-nav'); - this.$resourcesNav = dom.querySelector(elementRef.nativeElement, '#resources-nav'); - // for some reason constructor is not run inside zone // as workaround running it manually zone.run(() => { @@ -251,6 +249,8 @@ export default class SideMenu extends BaseComponent { } init() { + this.$mobileNav = this.dom.querySelector(this.$element, '.mobile-nav'); + this.$resourcesNav = this.dom.querySelector(this.$element, '#resources-nav'); this.changeActive(CHANGE.INITIAL); } } diff --git a/lib/components/SideMenu/side-menu.spec.js b/lib/components/SideMenu/side-menu.spec.js index 5785c751..0e5ce1ad 100644 --- a/lib/components/SideMenu/side-menu.spec.js +++ b/lib/components/SideMenu/side-menu.spec.js @@ -32,7 +32,6 @@ describe('Redoc components', () => { beforeEachProviders(() => [ provide(SchemaManager, {useValue: new SchemaManager()}), provide(BrowserDomAdapter, {useValue: new BrowserDomAdapter()}), - provide('OPTION_NAMES', {useValue: []}), provide(OptionsManager, {useValue: testOptions}) ]); beforeEach(injectAsync([TestComponentBuilder, SchemaManager], (tcb, schemaMgr) => { diff --git a/lib/index.js b/lib/index.js index 70104b76..1a0b8775 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,10 +1,7 @@ 'use strict'; import {Redoc} from './components/index'; -import {enableProdMode} from 'angular2/core'; - export var init = Redoc.init; window.Redoc = Redoc; -enableProdMode(); Redoc.autoInit(); diff --git a/lib/options.js b/lib/options.js index 831f7362..689310a5 100644 --- a/lib/options.js +++ b/lib/options.js @@ -1,20 +1,22 @@ 'use strict'; -import {Inject} from 'angular2/core'; import {isFunction, isString} from 'angular2/src/facade/lang'; import {BrowserDomAdapter} from 'angular2/platform/browser'; +import {global} from 'angular2/src/facade/lang'; var defaults = { scrollYOffset: 0, - disableLazySchemas: false + disableLazySchemas: false, + debugMode: global.redocDebugMode }; -@Reflect.metadata('parameters', [[new Inject('OPTION_NAMES')], [BrowserDomAdapter]]) +var OPTION_NAMES = new Set(['scrollYOffset', 'disableLazySchemas']); + +@Reflect.metadata('parameters', [[BrowserDomAdapter]]) export default class OptionsManager { - constructor(optionNames, dom) { + constructor() { this._options = defaults; - this.optionNames = optionNames; - this.dom = dom; + this.dom = new BrowserDomAdapter(); } get options() { @@ -36,7 +38,7 @@ export default class OptionsManager { name: k.replace(/-(.)/g, (m, $1) => $1.toUpperCase()) }) ) - .filter(option => this.optionNames.has(option.name)) + .filter(option => OPTION_NAMES.has(option.name)) .forEach(option => { parsedOpts[option.name] = attributesMap.get(option.attrName); }); diff --git a/lib/utils/pipes.js b/lib/utils/pipes.js index 32c23fbc..45f5af15 100644 --- a/lib/utils/pipes.js +++ b/lib/utils/pipes.js @@ -4,7 +4,6 @@ import {Pipe} from 'angular2/core'; import {isString, stringify, isBlank} from 'angular2/src/facade/lang'; import {BaseException} from 'angular2/src/facade/exceptions'; import {JsonPointer} from './JsonPointer'; -import marked from 'marked'; import Prism from 'prismjs'; import 'prismjs/components/prism-actionscript.js'; @@ -30,6 +29,8 @@ import 'prismjs/components/prism-vim.js'; import 'prismjs/themes/prism-dark.css!css'; +import marked from 'marked'; + marked.setOptions({ renderer: new marked.Renderer(), gfm: true, diff --git a/package.json b/package.json index 02d313da..55d5e1aa 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "jspm": { "configFile": "system.config.js", "dependencies": { - "angular2": "npm:angular2@^2.0.0-beta.0", + "angular2": "npm:angular2@2.0.0-beta.3", "es6-shim": "github:es-shims/es6-shim@^0.33.6", "json-formatter-js": "npm:json-formatter-js@^0.2.0", "json-pointer": "npm:json-pointer@^0.3.0", diff --git a/system.config.js b/system.config.js index 59157f88..92b58f7f 100644 --- a/system.config.js +++ b/system.config.js @@ -37,7 +37,7 @@ System.config({ }, map: { - "angular2": "npm:angular2@2.0.0-beta.0", + "angular2": "npm:angular2@2.0.0-beta.3", "babel": "npm:babel-core@5.8.34", "babel-runtime": "npm:babel-runtime@5.8.34", "clean-css": "npm:clean-css@3.4.6", @@ -135,14 +135,14 @@ System.config({ "path": "github:jspm/nodelibs-path@0.1.0", "process": "github:jspm/nodelibs-process@0.1.2" }, - "npm:angular2@2.0.0-beta.0": { + "npm:angular2@2.0.0-beta.3": { "crypto": "github:jspm/nodelibs-crypto@0.1.0", "es6-promise": "npm:es6-promise@3.0.2", "es6-shim": "npm:es6-shim@0.33.13", "process": "github:jspm/nodelibs-process@0.1.2", "reflect-metadata": "npm:reflect-metadata@0.1.2", "rxjs": "npm:rxjs@5.0.0-beta.0", - "zone.js": "npm:zone.js@0.5.10" + "zone.js": "npm:zone.js@0.5.11" }, "npm:argparse@1.0.3": { "assert": "github:jspm/nodelibs-assert@0.1.0", @@ -153,9 +153,9 @@ System.config({ "sprintf-js": "npm:sprintf-js@1.0.3", "util": "github:jspm/nodelibs-util@0.1.0" }, - "npm:asn1.js@4.3.0": { + "npm:asn1.js@4.4.0": { "assert": "github:jspm/nodelibs-assert@0.1.0", - "bn.js": "npm:bn.js@4.6.4", + "bn.js": "npm:bn.js@4.10.3", "buffer": "github:jspm/nodelibs-buffer@0.1.0", "inherits": "npm:inherits@2.0.1", "minimalistic-assert": "npm:minimalistic-assert@1.0.0", @@ -199,11 +199,14 @@ System.config({ "readable-stream": "npm:readable-stream@2.0.5", "util": "github:jspm/nodelibs-util@0.1.0" }, + "npm:bn.js@4.10.3": { + "buffer": "github:jspm/nodelibs-buffer@0.1.0" + }, "npm:boom@2.10.1": { "hoek": "npm:hoek@2.16.3", "http": "github:jspm/nodelibs-http@1.7.1" }, - "npm:browserify-aes@1.0.5": { + "npm:browserify-aes@1.0.6": { "buffer": "github:jspm/nodelibs-buffer@0.1.0", "buffer-xor": "npm:buffer-xor@1.0.3", "cipher-base": "npm:cipher-base@1.0.2", @@ -215,7 +218,7 @@ System.config({ "systemjs-json": "github:systemjs/plugin-json@0.1.0" }, "npm:browserify-cipher@1.0.0": { - "browserify-aes": "npm:browserify-aes@1.0.5", + "browserify-aes": "npm:browserify-aes@1.0.6", "browserify-des": "npm:browserify-des@1.0.0", "buffer": "github:jspm/nodelibs-buffer@0.1.0", "crypto": "github:jspm/nodelibs-crypto@0.1.0", @@ -229,20 +232,20 @@ System.config({ "inherits": "npm:inherits@2.0.1" }, "npm:browserify-rsa@4.0.0": { - "bn.js": "npm:bn.js@4.6.4", + "bn.js": "npm:bn.js@4.10.3", "buffer": "github:jspm/nodelibs-buffer@0.1.0", "constants": "github:jspm/nodelibs-constants@0.1.0", "crypto": "github:jspm/nodelibs-crypto@0.1.0", "randombytes": "npm:randombytes@2.0.2" }, "npm:browserify-sign@4.0.0": { - "bn.js": "npm:bn.js@4.6.4", + "bn.js": "npm:bn.js@4.10.3", "browserify-rsa": "npm:browserify-rsa@4.0.0", "buffer": "github:jspm/nodelibs-buffer@0.1.0", "create-hash": "npm:create-hash@1.1.2", "create-hmac": "npm:create-hmac@1.1.4", "crypto": "github:jspm/nodelibs-crypto@0.1.0", - "elliptic": "npm:elliptic@6.0.2", + "elliptic": "npm:elliptic@6.2.3", "inherits": "npm:inherits@2.0.1", "parse-asn1": "npm:parse-asn1@5.0.0", "stream": "github:jspm/nodelibs-stream@0.1.0" @@ -332,10 +335,10 @@ System.config({ "buffer": "github:jspm/nodelibs-buffer@0.1.0" }, "npm:create-ecdh@4.0.0": { - "bn.js": "npm:bn.js@4.6.4", + "bn.js": "npm:bn.js@4.10.3", "buffer": "github:jspm/nodelibs-buffer@0.1.0", "crypto": "github:jspm/nodelibs-crypto@0.1.0", - "elliptic": "npm:elliptic@6.0.2" + "elliptic": "npm:elliptic@6.2.3" }, "npm:create-hash@1.1.2": { "buffer": "github:jspm/nodelibs-buffer@0.1.0", @@ -363,14 +366,14 @@ System.config({ "create-ecdh": "npm:create-ecdh@4.0.0", "create-hash": "npm:create-hash@1.1.2", "create-hmac": "npm:create-hmac@1.1.4", - "diffie-hellman": "npm:diffie-hellman@5.0.1", + "diffie-hellman": "npm:diffie-hellman@5.0.2", "inherits": "npm:inherits@2.0.1", "pbkdf2": "npm:pbkdf2@3.0.4", "public-encrypt": "npm:public-encrypt@4.0.0", "randombytes": "npm:randombytes@2.0.2" }, - "npm:dashdash@1.12.1": { - "assert-plus": "npm:assert-plus@0.1.5", + "npm:dashdash@1.12.2": { + "assert-plus": "npm:assert-plus@0.2.0", "fs": "github:jspm/nodelibs-fs@0.1.2", "path": "github:jspm/nodelibs-path@0.1.0", "process": "github:jspm/nodelibs-process@0.1.2", @@ -393,8 +396,8 @@ System.config({ "inherits": "npm:inherits@2.0.1", "minimalistic-assert": "npm:minimalistic-assert@1.0.0" }, - "npm:diffie-hellman@5.0.1": { - "bn.js": "npm:bn.js@4.6.4", + "npm:diffie-hellman@5.0.2": { + "bn.js": "npm:bn.js@4.10.3", "buffer": "github:jspm/nodelibs-buffer@0.1.0", "crypto": "github:jspm/nodelibs-crypto@0.1.0", "miller-rabin": "npm:miller-rabin@4.0.0", @@ -406,8 +409,8 @@ System.config({ "crypto": "github:jspm/nodelibs-crypto@0.1.0", "jsbn": "npm:jsbn@0.1.0" }, - "npm:elliptic@6.0.2": { - "bn.js": "npm:bn.js@4.6.4", + "npm:elliptic@6.2.3": { + "bn.js": "npm:bn.js@4.10.3", "brorand": "npm:brorand@1.0.5", "hash.js": "npm:hash.js@1.0.3", "inherits": "npm:inherits@2.0.1", @@ -584,7 +587,7 @@ System.config({ "process": "github:jspm/nodelibs-process@0.1.2" }, "npm:miller-rabin@4.0.0": { - "bn.js": "npm:bn.js@4.6.4", + "bn.js": "npm:bn.js@4.10.3", "brorand": "npm:brorand@1.0.5" }, "npm:mime-db@1.21.0": { @@ -616,8 +619,8 @@ System.config({ "process": "github:jspm/nodelibs-process@0.1.2" }, "npm:parse-asn1@5.0.0": { - "asn1.js": "npm:asn1.js@4.3.0", - "browserify-aes": "npm:browserify-aes@1.0.5", + "asn1.js": "npm:asn1.js@4.4.0", + "browserify-aes": "npm:browserify-aes@1.0.6", "buffer": "github:jspm/nodelibs-buffer@0.1.0", "create-hash": "npm:create-hash@1.1.2", "evp_bytestokey": "npm:evp_bytestokey@1.0.0", @@ -637,10 +640,7 @@ System.config({ "systemjs-json": "github:systemjs/plugin-json@0.1.0" }, "npm:pinkie-promise@2.0.0": { - "pinkie": "npm:pinkie@2.0.1" - }, - "npm:pinkie@2.0.1": { - "process": "github:jspm/nodelibs-process@0.1.2" + "pinkie": "npm:pinkie@2.0.4" }, "npm:prismjs@1.3.0": { "buffer": "github:jspm/nodelibs-buffer@0.1.0", @@ -654,7 +654,7 @@ System.config({ "assert": "github:jspm/nodelibs-assert@0.1.0" }, "npm:public-encrypt@4.0.0": { - "bn.js": "npm:bn.js@4.6.4", + "bn.js": "npm:bn.js@4.10.3", "browserify-rsa": "npm:browserify-rsa@4.0.0", "buffer": "github:jspm/nodelibs-buffer@0.1.0", "create-hash": "npm:create-hash@1.1.2", @@ -758,7 +758,7 @@ System.config({ "assert-plus": "npm:assert-plus@0.2.0", "buffer": "github:jspm/nodelibs-buffer@0.1.0", "crypto": "github:jspm/nodelibs-crypto@0.1.0", - "dashdash": "npm:dashdash@1.12.1", + "dashdash": "npm:dashdash@1.12.2", "ecc-jsbn": "npm:ecc-jsbn@0.1.1", "jodid25519": "npm:jodid25519@1.0.2", "jsbn": "npm:jsbn@0.1.0", @@ -866,7 +866,7 @@ System.config({ "systemjs-json": "github:systemjs/plugin-json@0.1.0", "validator": "npm:validator@4.5.0" }, - "npm:zone.js@0.5.10": { + "npm:zone.js@0.5.11": { "es6-promise": "npm:es6-promise@3.0.2", "process": "github:jspm/nodelibs-process@0.1.2" } diff --git a/tests/helpers.js b/tests/helpers.js index 3ce7c4ca..90f2bc14 100644 --- a/tests/helpers.js +++ b/tests/helpers.js @@ -1,27 +1,20 @@ 'use strict'; -import {BrowserDomAdapter} from 'angular2/platform/browser'; -BrowserDomAdapter.makeCurrent(); +import {By} from 'angular2/platform/browser'; /** Gets a child DebugElement by tag name. */ export function getChildDebugElement(parent, tagName) { - return parent.query(debugEl => { - return debugEl.nativeElement.tagName && debugEl.nativeElement.tagName.toLowerCase() === tagName; - }); + return parent.query(By.css(tagName)); } /** Gets a child DebugElement by Component Type. */ export function getChildDebugElementByType(parent, type) { - return parent.query(debugEl => { - return debugEl.componentInstance instanceof type; - }); + return parent.query(By.directive(type)); } /** Gets a child DebugElements by tag name. */ export function getChildDebugElementAll(parent, tagName) { - return parent.queryAll(debugEl => { - return debugEl.nativeElement.tagName && debugEl.nativeElement.tagName.toLowerCase() === tagName; - }); + return parent.queryAll(By.css(tagName)); } export function mouseclick( element ) { diff --git a/tests/setup.js b/tests/setup.js new file mode 100644 index 00000000..d008172c --- /dev/null +++ b/tests/setup.js @@ -0,0 +1,13 @@ +'use strict'; + +import {setBaseTestProviders} from 'angular2/testing'; + +import { + TEST_BROWSER_PLATFORM_PROVIDERS, + TEST_BROWSER_APPLICATION_PROVIDERS +} from 'angular2/platform/testing/browser'; +import { + + ELEMENT_PROBE_PROVIDERS_PROD_MODE +} from 'angular2/platform/browser'; +setBaseTestProviders(TEST_BROWSER_PLATFORM_PROVIDERS, [TEST_BROWSER_APPLICATION_PROVIDERS, ELEMENT_PROBE_PROVIDERS_PROD_MODE]);