Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azure-tools/codegen

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure-tools/codegen - npm Package Compare versions

Comparing version 2.1.223 to 2.1.227

1

dist/initializer.d.ts

@@ -16,2 +16,3 @@ export declare type Primitive = string | number | boolean | bigint | symbol | undefined | null;

protected apply<T>(...initializer: Array<DeepPartial<T> | undefined>): void;
protected applyWithExclusions<T>(exclusions: Array<string>, ...initializer: Array<DeepPartial<T> | undefined>): void;
protected applyTo<T>($this: T, ...initializer: Array<DeepPartial<T> | undefined>): void;

@@ -18,0 +19,0 @@ }

@@ -8,3 +8,4 @@ "use strict";

const linq_1 = require("@azure-tools/linq");
function applyTo(source, target, cache = new Set()) {
const empty = new Set();
function applyTo(source, target, exclusions, cache = new Set()) {
if (cache.has(source)) {

@@ -14,2 +15,5 @@ throw new Error('Circular refrenced models are not permitted in apply() initializers.');

for (const i of linq_1.keys(source)) {
if (exclusions.has(i)) {
continue;
}
switch (typeof source[i]) {

@@ -20,3 +24,9 @@ case 'object':

cache.add(source);
applyTo(source[i], target[i], cache);
try {
applyTo(source[i], target[i], exclusions, cache);
}
catch (E) {
console.error(` in property: ${i} `);
throw E;
}
cache.delete(source);

@@ -59,8 +69,14 @@ continue;

for (const each of initializer) {
applyTo(each, this);
applyTo(each, this, empty);
}
}
applyWithExclusions(exclusions, ...initializer) {
const filter = new Set(exclusions);
for (const each of initializer) {
applyTo(each, this, filter);
}
}
applyTo($this, ...initializer) {
for (const each of initializer) {
applyTo(each, $this);
applyTo(each, $this, empty);
}

@@ -67,0 +83,0 @@ }

6

package.json
{
"name": "@azure-tools/codegen",
"version": "2.1.223",
"version": "2.1.227",
"patchOffset": 100,

@@ -51,4 +51,4 @@ "description": "Autorest Code generator common and base classes",

"dependencies": {
"@azure-tools/async-io": "~3.0.207",
"@azure-tools/linq": "~3.1.213",
"@azure-tools/async-io": "~3.0.209",
"@azure-tools/linq": "~3.1.215",
"js-yaml": "3.13.1",

@@ -55,0 +55,0 @@ "semver": "^5.5.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc