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

Add license header & bump rlc-common version #1663

Merged
merged 7 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
248 changes: 124 additions & 124 deletions packages/autorest.typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,126 +1,126 @@
{
"name": "@autorest/typescript",
"version": "6.0.0-rc.3",
"scripts": {
"build": "tsc -p . && npm run copyFiles",
"build:test:browser": "tsc -p tsconfig.browser-test.json && webpack --config webpack.config.test.js",
"check:tree": "ts-node ./test/commands/check-clean-tree.ts",
"pack": "npm pack 2>&1",
"clean": "rimraf test-browser test/**/node_modules",
"start": "node ./dist/src/main.js",
"test": "npm-run-all unit-test integration-test rlc-integration-test validate-version-tolerance",
"test:node": "npm run unit-test && npm run start-test-server:v2 & npm run integration-test:alone & npm run rlc-integration-test:alone & npm run test-version-tolerance & npm run stop-test-server",
"test:node:alone": "npm run unit-test && npm run integration-test:alone && npm run rlc-integration-test:alone && npm run test-version-tolerance",
"test:browser": "npm run start-test-server:v2 & npm run integration-test:browser & npm run rlc-integration-test:browser & npm run test-version-tolerance & npm run stop-test-server",
"test:browser:alone": "npm run integration-test:browser && npm run rlc-integration-test:browser && npm run test-version-tolerance",
"rlc-test:node": "npm run unit-test && npm run start-test-server:v2 & npm run rlc-integration-test:alone && npm run stop-test-server",
"rlc-test:browser": "npm run start-test-server:v2 & npm run rlc-integration-test:browser && npm run stop-test-server",
"unit-test": "mocha -r ts-node/register \"./test/unit/**/*spec.ts\"",
"integration-test": "npm run start-test-server:v2 & npm run generate-and-test && npm run stop-test-server",
"integration-test:new": "npm-run-all start-test-server generate-and-test integration-test:alone stop-test-server",
"integration-test:browser": "npm run build:test:browser && karma start karma.conf.js",
"generate-and-test": "npm-run-all -s build generate-swaggers integration-test:alone integration-test:browser",
"integration-test:alone": "mocha -r ts-node/register --timeout 2000 \"./test/integration/**/!(sampleTest).spec.ts\"",
"rlc-integration-test": "npm run start-test-server:v2 & npm run rlc-generate-and-test && npm run stop-test-server",
"rlc-integration-test:new": "npm-run-all start-test-server rlc-generate-and-test rlc-integration-test:alone stop-test-server",
"rlc-integration-test:browser": "npm run build:test:browser && karma start karma.conf.js",
"rlc-generate-and-test": "npm-run-all -s build rlc-generate-swaggers rlc-integration-test:alone rlc-integration-test:browser",
"rlc-integration-test:alone": "mocha -r ts-node/register --timeout 2000 \"./test/rlcIntegration/**/!(sampleTest).spec.ts\"",
"start-test-server": "ts-node test/commands/start-server.ts",
"start-test-server:v2": "autorest-testserver run --appendCoverage",
"stop-test-server": "autorest-testserver stop",
"debug": "node --inspect-brk ./dist/src/main.js",
"generate-swaggers": "ts-node ./test/commands/test-swagger-gen.ts",
"rlc-generate-swaggers": "ts-node ./test/commands/test-swagger-gen.ts -- rlc",
"validate-version-tolerance": "npm run start-test-server:v2 & npm run generate-version-tolerance && npm run generate-version-tolerance:tests && npm run test-version-tolerance && npm run stop-test-server",
"generate-version-tolerance": "ts-node ./test/commands/version-tolerance.ts",
"generate-version-tolerance:tests": "ts-node ./test/commands/version-tolerance.ts --test-gen",
"test-version-tolerance": "mocha -r ts-node/register --timeout 2000 \"./test/version-tolerance/**/!(sampleTest).spec.ts\"",
"clone:specs": "git clone -c core.longpaths=true https://github.com/Azure/azure-rest-api-specs.git ./.tmp/specs",
"smoke-test": "ts-node ./test/commands/smoke-test.ts",
"copyFiles": "ts-node ./src/utils/copyFiles.ts"
},
"browser": {
"./test-browser/utils/stream-helpers.js": "./test-browser/utils/stream-helpers.browser.js",
"./test-browser/utils/fileSystem.js": "./test-browser/utils/fileSystem.browser.js",
"./test-browser/utils/path.js": "./test-browser/utils/path.browser.js"
},
"files": [
"src",
"dist/**",
"README.md",
"LICENSE"
],
"dependencies": {
"@autorest/codemodel": "~4.18.2",
"@autorest/extension-base": "^3.4.1",
"@autorest/testmodeler": "^2.2.5",
"@azure-rest/core-client": "^1.0.0",
"@azure-tools/codegen": "^2.5.294",
"@azure/core-client": "^1.6.1",
"@azure/core-http": "^1.2.4",
"@azure/core-http-compat": "^1.2.0",
"@azure/core-lro": "^2.4.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/core-tracing": "^1.0.0",
"@azure/logger": "^1.0.0",
"@types/lodash": "^4.14.149",
"dotenv": "^8.2.0",
"fs-extra": "^10.0.0",
"handlebars": "^4.7.7",
"lodash": "^4.17.21",
"prettier": "^1.19.1",
"source-map-support": "^0.5.16",
"ts-morph": "^15.1.0",
"@azure/core-auth": "^1.3.2",
"@azure-tools/rlc-common": "1.0.0-beta.2"
},
"devDependencies": {
"@azure-tools/test-recorder": "^1.0.0",
"@azure/abort-controller": "^1.0.1",
"@azure/core-util": "^1.0.0-beta.1",
"@azure/core-xml": "^1.0.0-beta.1",
"@microsoft.azure/autorest.testserver": "^3.3.34",
"@types/chai": "^4.2.8",
"@types/fs-extra": "^8.1.0",
"@types/js-yaml": "3.12.1",
"@types/mocha": "^5.2.7",
"@types/node": "^18.0.0",
"@types/prettier": "^1.18.4",
"@types/sinon": "^10.0.0",
"@types/xmlbuilder": "0.0.34",
"@types/yargs": "^17.0.10",
"@typescript-eslint/eslint-plugin": "^5.25.0",
"@typescript-eslint/parser": "^5.25.0",
"autorest": "^3.4.2",
"chai": "^4.2.0",
"chalk": "^4.0.0",
"directory-tree": "^2.2.7",
"eslint": "^8.18.0",
"karma": "^6.3.18",
"karma-chrome-launcher": "^3.1.0",
"karma-mocha": "^2.0.1",
"karma-source-map-support": "^1.4.0",
"karma-typescript": "^5.0.3",
"karma-typescript-es6-transform": "^5.0.3",
"mocha": "^9.2.2",
"moment": "^2.29.4",
"node-cmd": "^3.0.0",
"npm-run-all": "^4.1.5",
"path-browserify": "^1.0.1",
"puppeteer": "^3.3.0",
"rimraf": "^3.0.2",
"sinon": "^10.0.0",
"source-map-loader": "^1.0.0",
"ts-node": "^8.5.2",
"typescript": "~4.8.0",
"wait-port": "^0.2.6",
"webpack": "^5.72.0",
"webpack-cli": "^4.9.2",
"yargs": "^17.4.1",
"tslib": "^2.3.1",
"openapi-types": "^7.0.0",
"buffer": "^6.0.3"
}
"name": "@autorest/typescript",
"version": "6.0.0-rc.3",
"scripts": {
"build": "tsc -p . && npm run copyFiles",
"build:test:browser": "tsc -p tsconfig.browser-test.json && webpack --config webpack.config.test.js",
"check:tree": "ts-node ./test/commands/check-clean-tree.ts",
"pack": "npm pack 2>&1",
"clean": "rimraf test-browser test/**/node_modules",
"start": "node ./dist/src/main.js",
"test": "npm-run-all unit-test integration-test rlc-integration-test validate-version-tolerance",
"test:node": "npm run unit-test && npm run start-test-server:v2 & npm run integration-test:alone & npm run rlc-integration-test:alone & npm run test-version-tolerance & npm run stop-test-server",
"test:node:alone": "npm run unit-test && npm run integration-test:alone && npm run rlc-integration-test:alone && npm run test-version-tolerance",
"test:browser": "npm run start-test-server:v2 & npm run integration-test:browser & npm run rlc-integration-test:browser & npm run test-version-tolerance & npm run stop-test-server",
"test:browser:alone": "npm run integration-test:browser && npm run rlc-integration-test:browser && npm run test-version-tolerance",
"rlc-test:node": "npm run unit-test && npm run start-test-server:v2 & npm run rlc-integration-test:alone && npm run stop-test-server",
"rlc-test:browser": "npm run start-test-server:v2 & npm run rlc-integration-test:browser && npm run stop-test-server",
"unit-test": "mocha -r ts-node/register \"./test/unit/**/*spec.ts\"",
"integration-test": "npm run start-test-server:v2 & npm run generate-and-test && npm run stop-test-server",
"integration-test:new": "npm-run-all start-test-server generate-and-test integration-test:alone stop-test-server",
"integration-test:browser": "npm run build:test:browser && karma start karma.conf.js",
"generate-and-test": "npm-run-all -s build generate-swaggers integration-test:alone integration-test:browser",
"integration-test:alone": "mocha -r ts-node/register --timeout 2000 \"./test/integration/**/!(sampleTest).spec.ts\"",
"rlc-integration-test": "npm run start-test-server:v2 & npm run rlc-generate-and-test && npm run stop-test-server",
"rlc-integration-test:new": "npm-run-all start-test-server rlc-generate-and-test rlc-integration-test:alone stop-test-server",
"rlc-integration-test:browser": "npm run build:test:browser && karma start karma.conf.js",
"rlc-generate-and-test": "npm-run-all -s build rlc-generate-swaggers rlc-integration-test:alone rlc-integration-test:browser",
"rlc-integration-test:alone": "mocha -r ts-node/register --timeout 2000 \"./test/rlcIntegration/**/!(sampleTest).spec.ts\"",
"start-test-server": "ts-node test/commands/start-server.ts",
"start-test-server:v2": "autorest-testserver run --appendCoverage",
"stop-test-server": "autorest-testserver stop",
"debug": "node --inspect-brk ./dist/src/main.js",
"generate-swaggers": "ts-node ./test/commands/test-swagger-gen.ts",
"rlc-generate-swaggers": "ts-node ./test/commands/test-swagger-gen.ts -- rlc",
"validate-version-tolerance": "npm run start-test-server:v2 & npm run generate-version-tolerance && npm run generate-version-tolerance:tests && npm run test-version-tolerance && npm run stop-test-server",
"generate-version-tolerance": "ts-node ./test/commands/version-tolerance.ts",
"generate-version-tolerance:tests": "ts-node ./test/commands/version-tolerance.ts --test-gen",
"test-version-tolerance": "mocha -r ts-node/register --timeout 2000 \"./test/version-tolerance/**/!(sampleTest).spec.ts\"",
"clone:specs": "git clone -c core.longpaths=true https://github.com/Azure/azure-rest-api-specs.git ./.tmp/specs",
"smoke-test": "ts-node ./test/commands/smoke-test.ts",
"copyFiles": "ts-node ./src/utils/copyFiles.ts"
},
"browser": {
"./test-browser/utils/stream-helpers.js": "./test-browser/utils/stream-helpers.browser.js",
"./test-browser/utils/fileSystem.js": "./test-browser/utils/fileSystem.browser.js",
"./test-browser/utils/path.js": "./test-browser/utils/path.browser.js"
},
"files": [
"src",
"dist/**",
"README.md",
"LICENSE"
],
"dependencies": {
"@autorest/codemodel": "~4.18.2",
"@autorest/extension-base": "^3.4.1",
"@autorest/testmodeler": "^2.2.5",
"@azure-rest/core-client": "^1.0.0",
"@azure-tools/codegen": "^2.5.294",
"@azure/core-client": "^1.6.1",
"@azure/core-http": "^1.2.4",
"@azure/core-http-compat": "^1.2.0",
"@azure/core-lro": "^2.4.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/core-tracing": "^1.0.0",
"@azure/logger": "^1.0.0",
"@types/lodash": "^4.14.149",
"dotenv": "^8.2.0",
"fs-extra": "^10.0.0",
"handlebars": "^4.7.7",
"lodash": "^4.17.21",
"prettier": "^1.19.1",
"source-map-support": "^0.5.16",
"ts-morph": "^15.1.0",
"@azure/core-auth": "^1.3.2",
"@azure-tools/rlc-common": "1.0.0-beta.4"
},
"devDependencies": {
"@azure-tools/test-recorder": "^1.0.0",
"@azure/abort-controller": "^1.0.1",
"@azure/core-util": "^1.0.0-beta.1",
"@azure/core-xml": "^1.0.0-beta.1",
"@microsoft.azure/autorest.testserver": "^3.3.34",
"@types/chai": "^4.2.8",
"@types/fs-extra": "^8.1.0",
"@types/js-yaml": "3.12.1",
"@types/mocha": "^5.2.7",
"@types/node": "^18.0.0",
"@types/prettier": "^1.18.4",
"@types/sinon": "^10.0.0",
"@types/xmlbuilder": "0.0.34",
"@types/yargs": "^17.0.10",
"@typescript-eslint/eslint-plugin": "^5.25.0",
"@typescript-eslint/parser": "^5.25.0",
"autorest": "^3.4.2",
"chai": "^4.2.0",
"chalk": "^4.0.0",
"directory-tree": "^2.2.7",
"eslint": "^8.18.0",
"karma": "^6.3.18",
"karma-chrome-launcher": "^3.1.0",
"karma-mocha": "^2.0.1",
"karma-source-map-support": "^1.4.0",
"karma-typescript": "^5.0.3",
"karma-typescript-es6-transform": "^5.0.3",
"mocha": "^9.2.2",
"moment": "^2.29.4",
"node-cmd": "^3.0.0",
"npm-run-all": "^4.1.5",
"path-browserify": "^1.0.1",
"puppeteer": "^3.3.0",
"rimraf": "^3.0.2",
"sinon": "^10.0.0",
"source-map-loader": "^1.0.0",
"ts-node": "^8.5.2",
"typescript": "~4.8.0",
"wait-port": "^0.2.6",
"webpack": "^5.72.0",
"webpack-cli": "^4.9.2",
"yargs": "^17.4.1",
"tslib": "^2.3.1",
"openapi-types": "^7.0.0",
"buffer": "^6.0.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export async function generateRestLevelClient() {
const licenseHeader = `// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n`;

if (isSourceCode) {
fileContents = `${licenseHeader.trimLeft()}\n${fileContents}`;
fileContents = `${licenseHeader.trimStart()}\n${fileContents}`;
}

// Format the contents if necessary
Expand Down
2 changes: 1 addition & 1 deletion packages/cadl-rlc-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "module",
"dependencies": {
"@cadl-lang/compiler": "0.36.0",
"@azure-tools/cadl-typescript": "1.0.0-beta.3",
"@azure-tools/cadl-typescript": "1.0.0-beta.4",
"@cadl-lang/rest": "0.18.0",
"@cadl-lang/openapi": "0.13.0",
"@cadl-lang/versioning": "0.9.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

// https://github.com/karma-runner/karma-chrome-launcher
process.env.CHROME_BIN = require("puppeteer").executablePath();
require("dotenv").config();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import nodeResolve from "@rollup/plugin-node-resolve";
import cjs from "@rollup/plugin-commonjs";
import sourcemaps from "rollup-plugin-sourcemaps";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { getClient, ClientOptions } from "@azure-rest/core-client";
import { KeyCredential } from "@azure/core-auth";
import { AnomalyDetectorClient } from "./clientDefinitions";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import {
UnivariateDetectUnivariateEntireSeriesParameters,
UnivariateDetectUnivariateLastPointParameters,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import AnomalyDetector from "./anomalyDetector";

export * from "./anomalyDetector";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import {
UnivariateDetectUnivariateEntireSeries200Response,
UnivariateDetectUnivariateEntireSeriesDefaultResponse,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/** The request of entire or last anomaly detection. */
export interface DetectRequest {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/** The response of entire anomaly detection. */
export interface EntireDetectResponseOutput {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import {
getPagedAsyncIterator,
PagedAsyncIterableIterator,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { RequestParameters } from "@azure-rest/core-client";
import {
DetectRequest,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { RawHttpHeaders } from "@azure/core-rest-pipeline";
import { HttpResponse } from "@azure-rest/core-client";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { Recorder } from "@azure-tools/test-recorder";
import { assert } from "chai";
import { createRecorder } from "./utils/recordedClient";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import * as dotenv from "dotenv";

dotenv.config();
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { Context } from "mocha";
import { Recorder, RecorderStartOptions } from "@azure-tools/test-recorder";
import "./env";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

// https://github.com/karma-runner/karma-chrome-launcher
process.env.CHROME_BIN = require("puppeteer").executablePath();
require("dotenv").config();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import nodeResolve from "@rollup/plugin-node-resolve";
import cjs from "@rollup/plugin-commonjs";
import sourcemaps from "rollup-plugin-sourcemaps";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import {
ProjectsCreateOrUpdateParameters,
ProjectsGetParameters,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import MicrosoftCognitiveLanguageServiceAnalyzeTextAuthoring from "./microsoftCognitiveLanguageServiceAnalyzeTextAuthoring";

export * from "./microsoftCognitiveLanguageServiceAnalyzeTextAuthoring";
Expand Down
Loading