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

@stencil/angular-output-target

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stencil/angular-output-target - npm Package Compare versions

Comparing version 0.7.2-dev.11691590901.1db83f93 to 0.7.2-dev.11691592740.18e8ffbc

30

dist/index.cjs.js

@@ -12,15 +12,7 @@ 'use strict';

/**
* The type of output that can be generated with the Angular output target.
* - `component` - Generate many component wrappers tied to a single Angular module (lazy/hydrated approach).
* - `scam` - Generate a Single Component Angular Module for each component.
* - `standalone` - Generate a component with the `standalone` flag set to `true`.
*/
var OutputType;
(function (OutputType) {
OutputType["Component"] = "component";
OutputType["Scam"] = "scam";
OutputType["Standalone"] = "standalone";
})(OutputType || (OutputType = {}));
const OutputTypes = {
Component: 'component',
Scam: 'scam',
Standalone: 'standalone',
};
const toLowerCase = (str) => str.toLowerCase();

@@ -123,3 +115,3 @@ const dashToPascalCase = (str) => toLowerCase(str)

const isOutputTypeCustomElementsBuild = (outputType) => {
return outputType === OutputType.Standalone || outputType === OutputType.Scam;
return outputType === OutputTypes.Standalone || outputType === OutputTypes.Scam;
};

@@ -423,5 +415,5 @@ /**

const componentsTypeFile = relativeImport(outputTarget.directivesProxyFile, dtsFilePath, '.d.ts');
const includeSingleComponentAngularModules = outputType === OutputType.Scam;
const includeSingleComponentAngularModules = outputType === OutputTypes.Scam;
const isCustomElementsBuild = isOutputTypeCustomElementsBuild(outputType);
const isStandaloneBuild = outputType === OutputType.Standalone;
const isStandaloneBuild = outputType === OutputTypes.Standalone;
const includeOutputImports = components.some((component) => component.events.some((event) => !event.internal));

@@ -535,3 +527,3 @@ /**

function normalizeOutputTarget(config, outputTarget) {
const results = Object.assign(Object.assign({}, outputTarget), { excludeComponents: outputTarget.excludeComponents || [], valueAccessorConfigs: outputTarget.valueAccessorConfigs || [], customElementsDir: outputTarget.customElementsDir || 'components', outputType: outputTarget.outputType || OutputType.Component });
const results = Object.assign(Object.assign({}, outputTarget), { excludeComponents: outputTarget.excludeComponents || [], valueAccessorConfigs: outputTarget.valueAccessorConfigs || [], customElementsDir: outputTarget.customElementsDir || 'components', outputType: outputTarget.outputType || OutputTypes.Component });
if (config.rootDir == null) {

@@ -552,4 +544,4 @@ throw new Error('rootDir is not set and it should be set by stencil itself');

}
if (outputTarget.outputType === OutputType.Scam) {
console.warn(`**Experimental**: outputType: "${OutputType.Scam}" is a developer preview feature and may change or be removed in the future.`);
if (outputTarget.outputType === OutputTypes.Scam) {
console.warn(`**Experimental**: outputType: "${OutputTypes.Scam}" is a developer preview feature and may change or be removed in the future.`);
}

@@ -556,0 +548,0 @@ return results;

import path from 'path';
import { EOL } from 'os';
/**
* The type of output that can be generated with the Angular output target.
* - `component` - Generate many component wrappers tied to a single Angular module (lazy/hydrated approach).
* - `scam` - Generate a Single Component Angular Module for each component.
* - `standalone` - Generate a component with the `standalone` flag set to `true`.
*/
var OutputType;
(function (OutputType) {
OutputType["Component"] = "component";
OutputType["Scam"] = "scam";
OutputType["Standalone"] = "standalone";
})(OutputType || (OutputType = {}));
const OutputTypes = {
Component: 'component',
Scam: 'scam',
Standalone: 'standalone',
};
const toLowerCase = (str) => str.toLowerCase();

@@ -114,3 +106,3 @@ const dashToPascalCase = (str) => toLowerCase(str)

const isOutputTypeCustomElementsBuild = (outputType) => {
return outputType === OutputType.Standalone || outputType === OutputType.Scam;
return outputType === OutputTypes.Standalone || outputType === OutputTypes.Scam;
};

@@ -414,5 +406,5 @@ /**

const componentsTypeFile = relativeImport(outputTarget.directivesProxyFile, dtsFilePath, '.d.ts');
const includeSingleComponentAngularModules = outputType === OutputType.Scam;
const includeSingleComponentAngularModules = outputType === OutputTypes.Scam;
const isCustomElementsBuild = isOutputTypeCustomElementsBuild(outputType);
const isStandaloneBuild = outputType === OutputType.Standalone;
const isStandaloneBuild = outputType === OutputTypes.Standalone;
const includeOutputImports = components.some((component) => component.events.some((event) => !event.internal));

@@ -526,3 +518,3 @@ /**

function normalizeOutputTarget(config, outputTarget) {
const results = Object.assign(Object.assign({}, outputTarget), { excludeComponents: outputTarget.excludeComponents || [], valueAccessorConfigs: outputTarget.valueAccessorConfigs || [], customElementsDir: outputTarget.customElementsDir || 'components', outputType: outputTarget.outputType || OutputType.Component });
const results = Object.assign(Object.assign({}, outputTarget), { excludeComponents: outputTarget.excludeComponents || [], valueAccessorConfigs: outputTarget.valueAccessorConfigs || [], customElementsDir: outputTarget.customElementsDir || 'components', outputType: outputTarget.outputType || OutputTypes.Component });
if (config.rootDir == null) {

@@ -543,4 +535,4 @@ throw new Error('rootDir is not set and it should be set by stencil itself');

}
if (outputTarget.outputType === OutputType.Scam) {
console.warn(`**Experimental**: outputType: "${OutputType.Scam}" is a developer preview feature and may change or be removed in the future.`);
if (outputTarget.outputType === OutputTypes.Scam) {
console.warn(`**Experimental**: outputType: "${OutputTypes.Scam}" is a developer preview feature and may change or be removed in the future.`);
}

@@ -547,0 +539,0 @@ return results;

import path from 'path';
import { OutputType } from './types';
import { relativeImport, normalizePath, sortBy, readPackageJson, dashToPascalCase, createImportStatement, isOutputTypeCustomElementsBuild, } from './utils';
import { relativeImport, normalizePath, sortBy, readPackageJson, dashToPascalCase, createImportStatement, isOutputTypeCustomElementsBuild, OutputTypes, } from './utils';
import { createAngularComponentDefinition, createComponentTypeDefinition } from './generate-angular-component';

@@ -43,5 +42,5 @@ import { generateAngularDirectivesFile } from './generate-angular-directives-file';

const componentsTypeFile = relativeImport(outputTarget.directivesProxyFile, dtsFilePath, '.d.ts');
const includeSingleComponentAngularModules = outputType === OutputType.Scam;
const includeSingleComponentAngularModules = outputType === OutputTypes.Scam;
const isCustomElementsBuild = isOutputTypeCustomElementsBuild(outputType);
const isStandaloneBuild = outputType === OutputType.Standalone;
const isStandaloneBuild = outputType === OutputTypes.Standalone;
const includeOutputImports = components.some((component) => component.events.some((event) => !event.internal));

@@ -48,0 +47,0 @@ /**

@@ -1,4 +0,3 @@

import { normalizePath } from './utils';
import { OutputTypes, normalizePath } from './utils';
import { angularDirectiveProxyOutput } from './output-angular';
import { OutputType } from './types';
import path from 'path';

@@ -18,3 +17,3 @@ export const angularOutputTarget = (outputTarget) => ({

export function normalizeOutputTarget(config, outputTarget) {
const results = Object.assign(Object.assign({}, outputTarget), { excludeComponents: outputTarget.excludeComponents || [], valueAccessorConfigs: outputTarget.valueAccessorConfigs || [], customElementsDir: outputTarget.customElementsDir || 'components', outputType: outputTarget.outputType || OutputType.Component });
const results = Object.assign(Object.assign({}, outputTarget), { excludeComponents: outputTarget.excludeComponents || [], valueAccessorConfigs: outputTarget.valueAccessorConfigs || [], customElementsDir: outputTarget.customElementsDir || 'components', outputType: outputTarget.outputType || OutputTypes.Component });
if (config.rootDir == null) {

@@ -35,6 +34,6 @@ throw new Error('rootDir is not set and it should be set by stencil itself');

}
if (outputTarget.outputType === OutputType.Scam) {
console.warn(`**Experimental**: outputType: "${OutputType.Scam}" is a developer preview feature and may change or be removed in the future.`);
if (outputTarget.outputType === OutputTypes.Scam) {
console.warn(`**Experimental**: outputType: "${OutputTypes.Scam}" is a developer preview feature and may change or be removed in the future.`);
}
return results;
}

@@ -7,7 +7,3 @@ /**

*/
export declare enum OutputType {
Component = "component",
Scam = "scam",
Standalone = "standalone"
}
export declare type OutputType = 'component' | 'scam' | 'standalone';
export interface OutputTargetAngular {

@@ -34,3 +30,3 @@ /**

*/
outputType: OutputType;
outputType?: OutputType;
}

@@ -37,0 +33,0 @@ export declare type ValueAccessorTypes = 'text' | 'radio' | 'select' | 'number' | 'boolean';

import { ComponentCompilerEvent, Config } from '@stencil/core/internal';
import { OutputType, PackageJSON } from './types';
export declare const OutputTypes: {
[key: string]: OutputType;
};
export declare const toLowerCase: (str: string) => string;

@@ -4,0 +7,0 @@ export declare const dashToPascalCase: (str: string) => string;

import path from 'path';
import { OutputType } from './types';
export const OutputTypes = {
Component: 'component',
Scam: 'scam',
Standalone: 'standalone',
};
export const toLowerCase = (str) => str.toLowerCase();

@@ -103,3 +107,3 @@ export const dashToPascalCase = (str) => toLowerCase(str)

export const isOutputTypeCustomElementsBuild = (outputType) => {
return outputType === OutputType.Standalone || outputType === OutputType.Scam;
return outputType === OutputTypes.Standalone || outputType === OutputTypes.Scam;
};

@@ -106,0 +110,0 @@ /**

{
"name": "@stencil/angular-output-target",
"version": "0.7.2-dev.11691590901.1db83f93",
"version": "0.7.2-dev.11691592740.18e8ffbc",
"description": "Angular output target for @stencil/core components.",

@@ -61,3 +61,3 @@ "main": "dist/index.cjs.js",

},
"gitHead": "db83f93bf80266494560db9c21d19f8f31a95df2",
"gitHead": "8e8ffbccb48cd9a2584e09710677d47e1ffce5b9",
"volta": {

@@ -64,0 +64,0 @@ "extends": "../../package.json"

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