Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR mariadb/resource-manager] Add mariadb/resource-manager/readme.typescript.md #141

Merged
merged 101 commits into from
Oct 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
3a5c5b8
Generate @azure/arm-containerregistry package
kpajdzik Oct 10, 2018
d819803
Generate @azure/arm-servicefabric package
kpajdzik Oct 10, 2018
2a8bf7b
Generate @azure/arm-containerservice package
kpajdzik Oct 10, 2018
7c8ebde
add code of conduct to the readme and contributing doc
jiyeonseo Oct 11, 2018
eb37c33
Generate @azure/arm-customerinsights package
kpajdzik Oct 11, 2018
78188db
Generate @azure/arm-datafactory package
kpajdzik Oct 11, 2018
c33c3b3
Generate @azure/arm-datamigration package
kpajdzik Oct 11, 2018
c691c20
Generate @azure/arm-deploymentmanager package
kpajdzik Oct 11, 2018
2108b37
Generate @azure/arm-deviceprovisioningservices package
kpajdzik Oct 11, 2018
5b1d11c
Generate @azure/arm-devspaces package
kpajdzik Oct 11, 2018
070d7b2
Generate @azure/arm-devtestlabs package
kpajdzik Oct 11, 2018
ee0d794
Generate @azure/arm-domainservices package
kpajdzik Oct 11, 2018
7fb1d13
Generate @azure/arm-eventgrid package
kpajdzik Oct 11, 2018
7491bde
Generate @azure/arm-eventhub package
kpajdzik Oct 11, 2018
ab2fa52
Generate @azure/arm-frontdoor package
kpajdzik Oct 11, 2018
b0567d6
Generate @azure/arm-hanaonazure package
kpajdzik Oct 11, 2018
6bdc61f
Generate @azure/arm-hdinsight package
kpajdzik Oct 11, 2018
29c6734
Generate @azure/arm-machinelearningcompute package
kpajdzik Oct 11, 2018
395899f
Generate @azure/arm-machinelearningservices package
kpajdzik Oct 11, 2018
06176d4
Generate servicefabric package with the correct name
kpajdzik Oct 11, 2018
8551ce3
Remove package with incorrect name
kpajdzik Oct 11, 2018
a7e6129
Generated from a90288c3762cb1ac6f3998e2cd1c23d33f37dcb4
AutorestCI Oct 11, 2018
565997f
Generated from f40292b667f4b6ce5b580131a308c336c9a9c9fc
AutorestCI Oct 12, 2018
5cc238f
Generated from a010c8c488db29050d5aa28557f4aab542e2fdfb
AutorestCI Oct 12, 2018
ebe0844
Generate @azure/graph package (#123)
kpajdzik Oct 12, 2018
5ae0354
Generate @azure/loganalytics package (#122)
kpajdzik Oct 12, 2018
df81803
Generate @azure/arm-operations package (#121)
kpajdzik Oct 12, 2018
86d4bd7
Generate @azure/arm-operationalinsights package (#120)
kpajdzik Oct 12, 2018
9e1305a
Generate @azure/arm-notificationhubs package (#119)
kpajdzik Oct 12, 2018
6e5d043
Generate @azure/arm-mysql package (#118)
kpajdzik Oct 12, 2018
7798129
Generate @azure/arm-monitor package (#117)
kpajdzik Oct 12, 2018
d0342ca
Generate @azure/arm-migrate package (#116)
kpajdzik Oct 12, 2018
b272eab
Generate @azure/arm-mediaservices package (#115)
kpajdzik Oct 12, 2018
60bfd00
Generate @azure/arm-marketplaceordering package (#114)
kpajdzik Oct 12, 2018
1baa23b
Generate @azure/arm-mariadb package (#113)
kpajdzik Oct 12, 2018
395be17
Generate @azure/arm-maps package (#112)
kpajdzik Oct 12, 2018
1ca6b85
Generate @azure/arm-managementpartner package (#111)
kpajdzik Oct 12, 2018
37cc93e
Generate @azure/arm-managementgroups package (#110)
kpajdzik Oct 12, 2018
77b1568
Generate @azure/arm-machinelearningexperimentation package (#108)
kpajdzik Oct 12, 2018
26eed8b
Generate @azure/arm-iotspaces package (#106)
kpajdzik Oct 12, 2018
2e10d06
Generate @azure/arm-iotcentral package (#104)
kpajdzik Oct 12, 2018
554f2fd
Generate @azure/arm-servicefabricmesh package (#81)
kpajdzik Oct 12, 2018
9a00686
Merge pull request #109 from Azure/generated/@azure/arm-machinelearni…
Oct 12, 2018
1a3600b
Merge pull request #107 from Azure/generated/@azure/arm-machinelearni…
Oct 12, 2018
6f992a7
Merge pull request #103 from Azure/generated/@azure/arm-hdinsight-201…
Oct 12, 2018
9d7a1bb
Merge pull request #96 from Azure/generated/@azure/arm-devspaces-2018…
Oct 12, 2018
b40df9d
Merge pull request #102 from Azure/generated/@azure/arm-hanaonazure-2…
Oct 12, 2018
310ad46
Merge pull request #94 from Azure/generated/@azure/arm-deploymentmana…
Oct 12, 2018
4e558e4
Merge pull request #100 from Azure/generated/@azure/arm-eventhub-2018…
Oct 12, 2018
fff39ad
Merge pull request #95 from Azure/generated/@azure/arm-deviceprovisio…
Oct 12, 2018
d585b30
Merge pull request #77 from Azure/generated/@azure/arm-containerregis…
Oct 12, 2018
14e7223
Merge pull request #99 from Azure/generated/@azure/arm-eventgrid-2018…
Oct 12, 2018
ce90d93
Generate @azure/arm-containerservice package
kpajdzik Oct 12, 2018
12ceaa5
Merge pull request #98 from Azure/generated/@azure/arm-domainservices…
Oct 12, 2018
e374b82
Merge pull request #83 from Azure/generated/@azure/arm-containerservi…
Oct 12, 2018
3132469
Merge pull request #101 from Azure/generated/@azure/arm-frontdoor-201…
Oct 12, 2018
17bf21c
Merge pull request #84 from jiyeonseo/master
Oct 12, 2018
cc45296
Merge pull request #97 from Azure/generated/@azure/arm-devtestlabs-20…
Oct 12, 2018
2f02a6e
Update SwaggerToSDK generator version to 2.0.559
Oct 12, 2018
3e10bb1
Merge pull request #82 from Azure/generated/@azure/arm-servicefabric-…
Oct 12, 2018
7a68bdc
Merge pull request #86 from Azure/generated/@azure/arm-customerinsigh…
Oct 12, 2018
85ce191
Merge pull request #90 from Azure/generated/@azure/arm-datafactory-20…
Oct 12, 2018
afbf2ce
Merge pull request #93 from Azure/generated/@azure/arm-datamigration-…
Oct 12, 2018
a6a86ac
Add generating readme files and SDKs (#39)
kpajdzik Oct 12, 2018
16a1a38
Generated from f3b3520c32cfe447a5f85b6491d65d59855b440a (#176)
AutorestCI Oct 12, 2018
bf310b0
Generated from 4e40c606f9da0b2bc4d5fc95cb7d6fe072cf2170 (#138)
AutorestCI Oct 15, 2018
3a65c35
Update generator version for Swagger to SDK
Oct 15, 2018
b17e795
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-js
Oct 15, 2018
29acdb4
Merge branch 'master' into daschult/swaggerToSdk
Oct 15, 2018
32d3b76
Merge pull request #170 from Azure/daschult/swaggerToSdk
Oct 15, 2018
f67bd2e
Merge pull request #158 from Azure/generated/@azure/arm-containerserv…
Oct 15, 2018
df48c71
Merge branch 'master' into restapi_auto_containerservices/resource-ma…
Oct 15, 2018
b376451
Remove unnecessary generated files
Oct 15, 2018
457cd1c
Merge pull request #181 from Azure/restapi_auto_containerservices/res…
Oct 15, 2018
ad3f89a
Merge branch 'master' into restapi_auto_containerregistry/resource-ma…
Oct 15, 2018
63a171c
Regenerate arm-containerregistry
Oct 15, 2018
eca2174
[AutoPR consumption/resource-manager] Introducing New Version 2018-10…
AutorestCI Oct 15, 2018
91ca2c2
Merge pull request #177 from Azure/restapi_auto_containerregistry/res…
Oct 15, 2018
fdda00a
Merge branch 'master' into restapi_auto_consumption/resource-manager
Oct 15, 2018
05d3570
Generated from 702e8f7ab327cd8fe694ed64684a300ed6bed1d9 (#185)
AutorestCI Oct 15, 2018
032f620
Regenerate arm-consumption
Oct 15, 2018
80b2828
Merge pull request #183 from Azure/restapi_auto_consumption/resource-…
Oct 15, 2018
91bee1e
Regenerate arm-sql
Oct 15, 2018
1033c3a
Regenerate arm-consumption
Oct 15, 2018
dee1330
Merge pull request #187 from Azure/restapi_auto_consumption/resource-…
Oct 15, 2018
babb6d9
Merge pull request #186 from Azure/restapi_auto_sql/resource-manager
Oct 15, 2018
b5cbe94
Upgrade Gulp to version 4.0.0 (#175)
kpajdzik Oct 15, 2018
2027522
Automate SDK regeneration (#212)
kpajdzik Oct 17, 2018
a211dec
Merge remote-tracking branch 'origin/master' into restapi_auto_genera…
kpajdzik Oct 17, 2018
87d8a4e
Regenerate package
kpajdzik Oct 17, 2018
2dd6d91
Merge remote-tracking branch 'origin/restapi_auto_generated/powerbiem…
kpajdzik Oct 17, 2018
c665779
Merge pull request #140 from Azure/restapi_auto_generated/deviceprovi…
Oct 17, 2018
cbb5a5d
Regenerated "@azure/arm-powerbiembedded" SDK.
kpajdzik Oct 17, 2018
589b96c
Merge pull request #133 from Azure/restapi_auto_generated/powerbiembe…
Oct 17, 2018
4f4743e
[AutoPR postgresql/resource-manager] Add postgresql/resource-manager/…
AutorestCI Oct 17, 2018
2e1d43a
[AutoPR eventgrid/data-plane] Add eventgrid/data-plane/readme.typescr…
AutorestCI Oct 17, 2018
79b2234
[AutoPR powerbidedicated/resource-manager] Add powerbidedicated/resou…
AutorestCI Oct 17, 2018
a1216d6
Restapi auto generated/search 2018 10 12 892 (#216)
kpajdzik Oct 17, 2018
ce91f80
[AutoPR iothub/resource-manager] Add iothub/resource-manager/readme.t…
AutorestCI Oct 17, 2018
f9e262f
Merge branch 'restapi_auto_generated/mariadb-2018-10-11-202' of https…
kpajdzik Oct 17, 2018
9377f2c
Regenerated "@azure/arm-mariadb" SDK.
kpajdzik Oct 17, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
74 changes: 74 additions & 0 deletions .scripts/commandLine.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/

import * as minimist from "minimist";
import { arrayContains } from "./common";

export interface CommandLineOptions extends minimist.ParsedArgs {
"azure-sdk-for-js-repo-root": string;
"azure-rest-api-specs-root": string;
debugger: boolean;
"logging-level": string;
package: string;
"skip-sdk": boolean;
"skip-spec": boolean;
type: string;
use: boolean;
verbose: boolean;
whatif: boolean;
getSdkType(): SdkType;
}

export const commandLineConfiguration = {
string: ["azure-sdk-for-js-repo-root", "azure-rest-api-specs-root", "logging-level", "package", "type"],
boolean: ["debugger", "use", "skip-sdk", "skip-spec", "verbose", "whatif"],
alias: {
l: "logging-level",
log: "logging-level",
package: "packageName",
u: "use",
v: "version",
},
default: {
"logging-level": "info",
type: "arm"
}
};

export enum SdkType {
ResourceManager = "resource-manager",
DataPlane = "data-plane",
ControlPlane = "control-plane"
}

let _options: CommandLineOptions;
export function getCommandLineOptions() {
if (!_options) {
_options = createCommandLineParameters();
}

return _options;
}

function createCommandLineParameters() {
const args = minimist(process.argv.slice(2), commandLineConfiguration) as CommandLineOptions;
args.getSdkType = getSdkType;
return args;
}

export function getSdkType() {
const resourceManagerStrings = ["arm", "rm", "resourcemanager"]
const dataPlaneStrings = ["dp", "data", "dataplane"]

const type = this.type.toLowerCase().replace("-", "");
if (arrayContains(resourceManagerStrings, type)) {
return SdkType.ResourceManager;
} else if (arrayContains(dataPlaneStrings, type)) {
return SdkType.DataPlane;
} else {
throw new Error("Unknown SDK type");
}
}
22 changes: 0 additions & 22 deletions .scripts/commandLineOptions.ts

This file was deleted.

57 changes: 57 additions & 0 deletions .scripts/common.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/

import * as fssync from "fs";
import { promises as fs } from "fs";
import { execSync } from "child_process";
import { getLogger } from "./logger";

const _logger = getLogger();

export function arrayContains<T>(array: T[], el: T): boolean {
return array.indexOf(el) != -1
}

export async function isDirectory(directoryPath: string): Promise<boolean> {
const stats = await fs.lstat(directoryPath);
return stats.isDirectory();
}

export async function pathExists(path: string): Promise<boolean> {
return new Promise<boolean>((resolve, reject) => {
fssync.exists(path, exists => {
resolve(exists);
})
});
}

export function startsWith(value: string, prefix: string): boolean {
return value && prefix && value.indexOf(prefix) === 0;
}

export function endsWith(value: string, suffix: string): boolean {
return value && suffix && value.length >= suffix.length && value.lastIndexOf(suffix) === value.length - suffix.length;
}

export function contains(values: string[], searchString: string): boolean {
return arrayContains(values, searchString);
}

export function execute(command: string, packageFolderPath: string): void {
if (!fssync.existsSync(packageFolderPath)) {
_logger.logWithPath(packageFolderPath, "Folder not found.");
} else {
execSync(command, { cwd: packageFolderPath, stdio: "inherit" });
}
}

export function npmRunBuild(packageFolderPath: string): void {
execute("npm run build", packageFolderPath);
}

export function npmInstall(packageFolderPath: string): void {
execute("npm install", packageFolderPath);
}
Loading