mirror of
https://github.com/azure/login.git
synced 2026-03-15 09:20:56 -04:00
@@ -20,10 +20,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const Utils_1 = __importDefault(require("PowerShell/Utilities/Utils"));
|
||||
const PowerShellToolRunner_1 = __importDefault(require("PowerShell/Utilities/PowerShellToolRunner"));
|
||||
const ScriptBuilder_1 = __importDefault(require("PowerShell/Utilities/ScriptBuilder"));
|
||||
const Constants_1 = __importDefault(require("PowerShell/Constants"));
|
||||
const Utils_1 = __importDefault(require("./Utilities/Utils"));
|
||||
const PowerShellToolRunner_1 = __importDefault(require("./Utilities/PowerShellToolRunner"));
|
||||
const ScriptBuilder_1 = __importDefault(require("./Utilities/ScriptBuilder"));
|
||||
const Constants_1 = __importDefault(require("./Constants"));
|
||||
class ServicePrincipalLogin {
|
||||
constructor(servicePrincipalId, servicePrincipalKey, tenantId, subscriptionId) {
|
||||
this.servicePrincipalId = servicePrincipalId;
|
||||
@@ -48,7 +48,7 @@ class ServicePrincipalLogin {
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.default = ServicePrincipalLogin;
|
||||
exports.ServicePrincipalLogin = ServicePrincipalLogin;
|
||||
ServicePrincipalLogin.environment = Constants_1.default.environment;
|
||||
ServicePrincipalLogin.scopeLevel = Constants_1.default.scopeLevel;
|
||||
ServicePrincipalLogin.scheme = Constants_1.default.scheme;
|
||||
|
||||
@@ -20,8 +20,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const os = __importStar(require("os"));
|
||||
const Constants_1 = __importDefault(require("PowerShell/Constants"));
|
||||
const PowerShellToolRunner_1 = __importDefault(require("PowerShell/Utilities/PowerShellToolRunner"));
|
||||
const Constants_1 = __importDefault(require("../Constants"));
|
||||
const PowerShellToolRunner_1 = __importDefault(require("./PowerShellToolRunner"));
|
||||
class Utils {
|
||||
static getLatestModule(moduleName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
|
||||
@@ -15,16 +15,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const crypto = __importStar(require("crypto"));
|
||||
const exec = __importStar(require("@actions/exec"));
|
||||
const io = __importStar(require("@actions/io"));
|
||||
const actions_secret_parser_1 = require("actions-secret-parser");
|
||||
const ServicePrincipalLogin_1 = __importDefault(require("PowerShell/ServicePrincipalLogin"));
|
||||
const ServicePrincipalLogin_1 = require("./PowerShell/ServicePrincipalLogin");
|
||||
var azPath;
|
||||
var prefix = !!process.env.AZURE_HTTP_USER_AGENT ? `${process.env.AZURE_HTTP_USER_AGENT}` : "";
|
||||
function main() {
|
||||
@@ -51,7 +48,7 @@ function main() {
|
||||
yield executeAzCliCommand(`account set --subscription "${subscriptionId}"`);
|
||||
if (enablePSSession) {
|
||||
console.log(`Running Azure PS Login`);
|
||||
const spnlogin = new ServicePrincipalLogin_1.default(servicePrincipalId, servicePrincipalKey, tenantId, subscriptionId);
|
||||
const spnlogin = new ServicePrincipalLogin_1.ServicePrincipalLogin(servicePrincipalId, servicePrincipalKey, tenantId, subscriptionId);
|
||||
spnlogin.initialize();
|
||||
spnlogin.login();
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import * as core from '@actions/core';
|
||||
|
||||
import Utils from 'PowerShell/Utilities/Utils';
|
||||
import PowerShellToolRunner from 'PowerShell/Utilities/PowerShellToolRunner';
|
||||
import ScriptBuilder from 'PowerShell/Utilities/ScriptBuilder';
|
||||
import Constants from 'PowerShell/Constants';
|
||||
import Utils from './Utilities/Utils';
|
||||
import PowerShellToolRunner from './Utilities/PowerShellToolRunner';
|
||||
import ScriptBuilder from './Utilities/ScriptBuilder';
|
||||
import Constants from './Constants';
|
||||
|
||||
export default class ServicePrincipalLogin implements IAzurePowerShellSession {
|
||||
export class ServicePrincipalLogin implements IAzurePowerShellSession {
|
||||
static readonly environment: string = Constants.environment;
|
||||
static readonly scopeLevel: string = Constants.scopeLevel;
|
||||
static readonly scheme: string = Constants.scheme;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import * as os from 'os';
|
||||
import * as exec from '@actions/exec';
|
||||
import * as io from '@actions/io';
|
||||
|
||||
import Constants from 'PowerShell/Constants';
|
||||
import PowerShellToolRunner from 'PowerShell/Utilities/PowerShellToolRunner';
|
||||
import Constants from '../Constants';
|
||||
import PowerShellToolRunner from './PowerShellToolRunner';
|
||||
|
||||
export default class Utils {
|
||||
static async getLatestModule(moduleName: string): Promise<string> {
|
||||
|
||||
@@ -4,7 +4,7 @@ import * as exec from '@actions/exec';
|
||||
import * as io from '@actions/io';
|
||||
|
||||
import { FormatType, SecretParser } from 'actions-secret-parser';
|
||||
import ServicePrincipalLogin from 'PowerShell/ServicePrincipalLogin';
|
||||
import { ServicePrincipalLogin } from './PowerShell/ServicePrincipalLogin';
|
||||
|
||||
var azPath: string;
|
||||
var prefix = !!process.env.AZURE_HTTP_USER_AGENT ? `${process.env.AZURE_HTTP_USER_AGENT}` : "";
|
||||
|
||||
@@ -38,11 +38,8 @@
|
||||
|
||||
/* Module Resolution Options */
|
||||
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
||||
"baseUrl": "src", /* Base directory to resolve non-absolute module names. */
|
||||
"paths": { /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
||||
"PowerShell/*": ["PowerShell/*"],
|
||||
"PowerShell/Utilities/*": [ "PowerShell/Utilities/*"]
|
||||
},
|
||||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
||||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
||||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
||||
// "typeRoots": [], /* List of folders to include type definitions from. */
|
||||
// "types": [], /* Type declaration files to be included in compilation. */
|
||||
|
||||
Reference in New Issue
Block a user