Skip to content

Commit 03592a9

Browse files
joheredichradek
andauthored
[synapse-artifacts] Update SynapseArtifacts with latest Swagger changes (#14669)
* Updates for Latest Swagger Changes * Format * Update changelog and constants file * Format * Add acceptance tests * Update sdk/synapse/synapse-artifacts/package.json Co-authored-by: chradek <51000525+chradek@users.noreply.github.com> Co-authored-by: chradek <51000525+chradek@users.noreply.github.com>
1 parent 7ffc0f6 commit 03592a9

File tree

84 files changed

+9061
-713
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+9061
-713
lines changed

sdk/synapse/synapse-artifacts/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Release History
22

3+
## 1.0.0-beta.4 (2021-04-06)
4+
5+
- Adds ADF support
6+
- Consume latest Code Generator changes
7+
38
## 1.0.0-beta.3 (2021-03-09)
49

510
- Regenerated from the latest versions of REST API and Code Generator

sdk/synapse/synapse-artifacts/api-extractor.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3-
"mainEntryPointFilePath": "./dist-esm/index.d.ts",
3+
"mainEntryPointFilePath": "types/src/index.d.ts",
44
"docModel": { "enabled": true },
55
"apiReport": { "enabled": true, "reportFolder": "./review" },
66
"dtsRollup": {
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
// https://github.com/karma-runner/karma-chrome-launcher
5+
process.env.CHROME_BIN = require("puppeteer").executablePath();
6+
require("dotenv").config();
7+
const {
8+
jsonRecordingFilterFunction,
9+
isPlaybackMode,
10+
isSoftRecordMode,
11+
isRecordMode
12+
} = require("@azure/test-utils-recorder");
13+
14+
module.exports = function(config) {
15+
config.set({
16+
// base path that will be used to resolve all patterns (eg. files, exclude)
17+
basePath: "./",
18+
19+
// frameworks to use
20+
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
21+
frameworks: ["source-map-support", "mocha"],
22+
23+
plugins: [
24+
"karma-mocha",
25+
"karma-mocha-reporter",
26+
"karma-chrome-launcher",
27+
"karma-edge-launcher",
28+
"karma-firefox-launcher",
29+
"karma-ie-launcher",
30+
"karma-env-preprocessor",
31+
"karma-coverage",
32+
"karma-sourcemap-loader",
33+
"karma-junit-reporter",
34+
"karma-json-to-file-reporter",
35+
"karma-source-map-support",
36+
"karma-json-preprocessor"
37+
],
38+
39+
// list of files / patterns to load in the browser
40+
files: [
41+
"dist-test/index.browser.js",
42+
{ pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true }
43+
].concat(isPlaybackMode() || isSoftRecordMode() ? ["recordings/browsers/**/*.json"] : []),
44+
45+
// list of files / patterns to exclude
46+
exclude: [],
47+
48+
// preprocess matching files before serving them to the browser
49+
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
50+
preprocessors: {
51+
"**/*.js": ["sourcemap", "env"],
52+
"recordings/browsers/**/*.json": ["json"]
53+
// IMPORTANT: COMMENT following line if you want to debug in your browsers!!
54+
// Preprocess source file to calculate code coverage, however this will make source file unreadable
55+
// "dist-test/index.js": ["coverage"]
56+
},
57+
58+
envPreprocessor: [
59+
"TEST_MODE",
60+
"ENDPOINT",
61+
"AZURE_CLIENT_ID",
62+
"AZURE_CLIENT_SECRET",
63+
"AZURE_TENANT_ID"
64+
],
65+
66+
// test results reporter to use
67+
// possible values: 'dots', 'progress'
68+
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
69+
reporters: ["mocha", "coverage", "junit", "json-to-file"],
70+
71+
coverageReporter: {
72+
// specify a common output directory
73+
dir: "coverage-browser/",
74+
reporters: [
75+
{ type: "json", subdir: ".", file: "coverage.json" },
76+
{ type: "lcovonly", subdir: ".", file: "lcov.info" },
77+
{ type: "html", subdir: "html" },
78+
{ type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" }
79+
]
80+
},
81+
82+
junitReporter: {
83+
outputDir: "", // results will be saved as $outputDir/$browserName.xml
84+
outputFile: "test-results.browser.xml", // if included, results will be saved as $outputDir/$browserName/$outputFile
85+
suite: "", // suite will become the package name attribute in xml testsuite element
86+
useBrowserName: false, // add browser name to report and classes names
87+
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
88+
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
89+
properties: {} // key value pair of properties to add to the <properties> section of the report
90+
},
91+
92+
jsonToFileReporter: {
93+
filter: jsonRecordingFilterFunction,
94+
outputPath: "."
95+
},
96+
97+
// web server port
98+
port: 9876,
99+
100+
// enable / disable colors in the output (reporters and logs)
101+
colors: true,
102+
103+
// level of logging
104+
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
105+
logLevel: config.LOG_INFO,
106+
107+
// enable / disable watching file and executing tests whenever any file changes
108+
autoWatch: false,
109+
110+
// --no-sandbox allows our tests to run in Linux without having to change the system.
111+
// --disable-web-security allows us to authenticate from the browser without having to write tests using interactive auth, which would be far more complex.
112+
browsers: ["ChromeHeadlessNoSandbox"],
113+
customLaunchers: {
114+
ChromeHeadlessNoSandbox: {
115+
base: "ChromeHeadless",
116+
flags: ["--no-sandbox", "--disable-web-security"]
117+
}
118+
},
119+
120+
// Continuous Integration mode
121+
// if true, Karma captures browsers, runs the tests and exits
122+
singleRun: false,
123+
124+
// Concurrency level
125+
// how many browser should be started simultaneous
126+
concurrency: 1,
127+
128+
browserNoActivityTimeout: 60000000,
129+
browserDisconnectTimeout: 10000,
130+
browserDisconnectTolerance: 3,
131+
browserConsoleLogOptions: {
132+
terminal: !isRecordMode()
133+
},
134+
135+
client: {
136+
mocha: {
137+
// change Karma's debug.html to the mocha web reporter
138+
reporter: "html",
139+
timeout: 0
140+
}
141+
}
142+
});
143+
};

sdk/synapse/synapse-artifacts/package.json

Lines changed: 58 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"author": "Microsoft Corporation",
44
"description": "A generated SDK for ArtifactsClient.",
55
"sdk-type": "client",
6-
"version": "1.0.0-beta.3",
6+
"version": "1.0.0-beta.4",
77
"homepage": "https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/synapse/synapse-artifacts/README.md",
88
"repository": "github:Azure/azure-sdk-for-js",
99
"dependencies": {
@@ -13,6 +13,9 @@
1313
"@azure/core-tracing": "1.0.0-preview.11",
1414
"tslib": "^2.0.0"
1515
},
16+
"browser": {
17+
"./dist-esm/test/public/utils/env.js": "./dist-esm/test/public/utils/env.browser.js"
18+
},
1619
"keywords": [
1720
"node",
1821
"azure",
@@ -32,44 +35,81 @@
3235
"module": "./dist-esm/src/index.js",
3336
"types": "./types/synapse-artifacts.d.ts",
3437
"devDependencies": {
35-
"typescript": "~4.2.0",
36-
"eslint": "^7.15.0",
37-
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
3838
"@azure/dev-tool": "^1.0.0",
39+
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
40+
"@azure/identity": "^1.1.0",
41+
"@azure/test-utils-recorder": "^1.0.0",
42+
"@microsoft/api-extractor": "7.7.11",
43+
"@rollup/plugin-commonjs": "11.0.2",
44+
"@types/chai": "^4.1.6",
45+
"@types/mocha": "^7.0.2",
46+
"chai": "^4.2.0",
47+
"dotenv": "^8.2.0",
48+
"eslint": "^7.15.0",
49+
"karma-chrome-launcher": "^3.0.0",
50+
"karma-coverage": "^2.0.0",
51+
"karma-env-preprocessor": "^0.1.1",
52+
"karma-firefox-launcher": "^1.1.0",
53+
"karma-ie-launcher": "^1.0.0",
54+
"karma-junit-reporter": "^2.0.1",
55+
"karma-mocha-reporter": "^2.2.5",
56+
"karma-mocha": "^2.0.1",
57+
"karma-sourcemap-loader": "^0.3.8",
58+
"karma": "^6.2.0",
59+
"mocha-junit-reporter": "^1.18.0",
60+
"mocha": "^7.1.1",
61+
"nyc": "^14.0.0",
62+
"prettier": "^1.16.4",
3963
"rimraf": "^3.0.0",
40-
"rollup": "^1.16.3",
4164
"rollup-plugin-node-resolve": "^3.4.0",
4265
"rollup-plugin-sourcemaps": "^0.4.2",
43-
"@rollup/plugin-commonjs": "11.0.2",
66+
"rollup": "^1.16.3",
4467
"uglify-js": "^3.4.9",
45-
"@microsoft/api-extractor": "7.7.11",
68+
"@types/chai-as-promised": "^7.1.0",
69+
"@types/node": "^8.0.0",
70+
"@types/sinon": "^9.0.4",
71+
"chai-as-promised": "^7.1.1",
72+
"cross-env": "^7.0.2",
73+
"karma-edge-launcher": "^0.4.2",
74+
"karma-json-preprocessor": "^0.3.3",
75+
"karma-json-to-file-reporter": "^1.0.1",
76+
"karma-source-map-support": "~1.4.0",
77+
"sinon": "^9.0.2",
78+
"source-map-support": "^0.5.9",
79+
"ts-node": "^9.0.0",
80+
"typescript": "~4.2.0",
4681
"typedoc": "0.15.2"
4782
},
4883
"bugs": {
4984
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
5085
},
5186
"files": [
5287
"dist/",
53-
"dist-esm/",
88+
"dist-esm/src/",
5489
"types/synapse-artifacts.d.ts",
5590
"README.md",
5691
"LICENSE"
5792
],
5893
"scripts": {
59-
"build": "tsc && rollup -c rollup.config.js && npm run minify && npm run extract-api",
94+
"build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1",
95+
"build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1",
96+
"build:samples": "echo Obsolete.",
97+
"build:test": "tsc -p . && rollup -c 2>&1",
98+
"build": "tsc -p . && rollup -c 2>&1 && api-extractor run --local",
99+
"build:debug": "tsc -p . && rollup -c 2>&1 && api-extractor run --local",
60100
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
61101
"pack": "npm pack 2>&1",
62-
"build:test": "echo skip",
63102
"lint": "echo skipped",
64103
"format": "echo skip format as this package has only auto generated code",
65104
"check-format": "echo skip format check as this package has only auto generated code",
66-
"test": "echo skip",
67-
"unit-test:browser": "echo skipped",
68-
"unit-test:node": "echo skipped",
105+
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
106+
"test:node": "npm run clean && npm run build:test && npm run unit-test:node",
107+
"test": "npm run clean && npm run build:test && npm run unit-test",
108+
"unit-test:browser": "karma start --single-run",
109+
"unit-test:node": "mocha -r esm --require ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace \"test/{,!(browser)/**/}*.spec.ts\"",
69110
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
70111
"extract-api": "api-extractor run --local",
71112
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
72-
"build:samples": "echo Skipped.",
73113
"docs": "typedoc --excludePrivate --excludeNotExported --excludeExternals --stripInternal --mode file --out ./dist/docs ./src"
74114
},
75115
"sideEffects": false,
@@ -83,6 +123,10 @@
83123
{
84124
"path": "src/utils/constants.ts",
85125
"prefix": "SDK_VERSION"
126+
},
127+
{
128+
"path": "swagger/README.md",
129+
"prefix": "package-version"
86130
}
87131
]
88132
}

sdk/synapse/synapse-artifacts/recordings/browsers/bigdatapools/recording_should_get_a_bigdatapool_by_name.json

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/synapse/synapse-artifacts/recordings/browsers/bigdatapools/recording_should_list_bigdatapools.json

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)