From 291803c31f829fe0d32bb3207bc11def95a7408c Mon Sep 17 00:00:00 2001 From: Nevena Bojovic Date: Tue, 1 Mar 2022 20:05:50 +0100 Subject: Urađena test aplikacija. Povezan front i back. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../@angular/cli/commands/analytics-impl.js | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 sandbox/testAppNevena/Front/node_modules/@angular/cli/commands/analytics-impl.js (limited to 'sandbox/testAppNevena/Front/node_modules/@angular/cli/commands/analytics-impl.js') diff --git a/sandbox/testAppNevena/Front/node_modules/@angular/cli/commands/analytics-impl.js b/sandbox/testAppNevena/Front/node_modules/@angular/cli/commands/analytics-impl.js new file mode 100644 index 00000000..9384ee63 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@angular/cli/commands/analytics-impl.js @@ -0,0 +1,80 @@ +"use strict"; +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AnalyticsCommand = void 0; +const analytics_1 = require("../models/analytics"); +const command_1 = require("../models/command"); +const analytics_2 = require("./analytics"); +class AnalyticsCommand extends command_1.Command { + async run(options) { + // Our parser does not support positional enums (won't report invalid parameters). Do the + // validation manually. + // TODO(hansl): fix parser to better support positionals. This would be a breaking change. + if (options.settingOrProject === undefined) { + if (options['--']) { + // The user passed positional arguments but they didn't validate. + this.logger.error(`Argument ${JSON.stringify(options['--'][0])} is invalid.`); + this.logger.error(`Please provide one of the following value: on, off, ci or project.`); + return 1; + } + else { + // No argument were passed. + await this.printHelp(); + return 2; + } + } + else if (options.settingOrProject == analytics_2.SettingOrProject.Project && + options.projectSetting === undefined) { + this.logger.error(`Argument ${JSON.stringify(options.settingOrProject)} requires a second ` + + `argument of one of the following value: on, off.`); + return 2; + } + try { + switch (options.settingOrProject) { + case analytics_2.SettingOrProject.Off: + (0, analytics_1.setAnalyticsConfig)('global', false); + break; + case analytics_2.SettingOrProject.On: + (0, analytics_1.setAnalyticsConfig)('global', true); + break; + case analytics_2.SettingOrProject.Ci: + (0, analytics_1.setAnalyticsConfig)('global', 'ci'); + break; + case analytics_2.SettingOrProject.Project: + switch (options.projectSetting) { + case analytics_2.ProjectSetting.Off: + (0, analytics_1.setAnalyticsConfig)('local', false); + break; + case analytics_2.ProjectSetting.On: + (0, analytics_1.setAnalyticsConfig)('local', true); + break; + case analytics_2.ProjectSetting.Prompt: + await (0, analytics_1.promptProjectAnalytics)(true); + break; + default: + await this.printHelp(); + return 3; + } + break; + case analytics_2.SettingOrProject.Prompt: + await (0, analytics_1.promptGlobalAnalytics)(true); + break; + default: + await this.printHelp(); + return 4; + } + } + catch (err) { + this.logger.fatal(err.message); + return 1; + } + return 0; + } +} +exports.AnalyticsCommand = AnalyticsCommand; -- cgit v1.2.3