@stencil/angular-output-target
Advanced tools
Comparing version
@@ -15,3 +15,3 @@ import { createComponentEventTypeImports, dashToPascalCase, formatToQuotedList } from './utils'; | ||
// If a member name includes a dash or a forward slash, we need to wrap it in quotes. | ||
// https://github.com/ionic-team/stencil-ds-output-targets/issues/212 | ||
// https://github.com/stenciljs/output-targets/issues/212 | ||
eventName = `'${prop.name}'`; | ||
@@ -18,0 +18,0 @@ } |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var path = require('path'); | ||
var os = require('os'); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var path__default = /*#__PURE__*/_interopDefaultLegacy(path); | ||
const OutputTypes = { | ||
@@ -55,3 +61,3 @@ Component: 'component', | ||
function relativeImport(pathFrom, pathTo, ext) { | ||
let relativePath = path.relative(path.dirname(pathFrom), path.dirname(pathTo)); | ||
let relativePath = path__default["default"].relative(path__default["default"].dirname(pathFrom), path__default["default"].dirname(pathTo)); | ||
if (relativePath === '') { | ||
@@ -63,7 +69,7 @@ relativePath = '.'; | ||
} | ||
return normalizePath(`${relativePath}/${path.basename(pathTo, ext)}`); | ||
return normalizePath(`${relativePath}/${path__default["default"].basename(pathTo, ext)}`); | ||
} | ||
async function readPackageJson(config, rootDir) { | ||
var _a; | ||
const pkgJsonPath = path.join(rootDir, 'package.json'); | ||
const pkgJsonPath = path__default["default"].join(rootDir, 'package.json'); | ||
let pkgJson; | ||
@@ -156,3 +162,3 @@ try { | ||
// If a member name includes a dash or a forward slash, we need to wrap it in quotes. | ||
// https://github.com/ionic-team/stencil-ds-output-targets/issues/212 | ||
// https://github.com/stenciljs/output-targets/issues/212 | ||
eventName = `'${prop.name}'`; | ||
@@ -358,3 +364,3 @@ } | ||
} | ||
const targetDir = path.dirname(outputTarget.directivesProxyFile); | ||
const targetDir = path__default["default"].dirname(outputTarget.directivesProxyFile); | ||
const normalizedValueAccessors = outputTarget.valueAccessorConfigs.reduce((allAccessors, va) => { | ||
@@ -377,4 +383,4 @@ const elementSelectors = Array.isArray(va.elementSelectors) ? va.elementSelectors : [va.elementSelectors]; | ||
const targetFileName = `${type}-value-accessor.ts`; | ||
const targetFilePath = path.join(targetDir, targetFileName); | ||
const srcFilePath = path.join(__dirname, '../resources/control-value-accessors/', targetFileName); | ||
const targetFilePath = path__default["default"].join(targetDir, targetFileName); | ||
const srcFilePath = path__default["default"].join(__dirname, '../resources/control-value-accessors/', targetFileName); | ||
const srcFileContents = await compilerCtx.fs.readFile(srcFilePath); | ||
@@ -399,4 +405,4 @@ const finalText = createValueAccessor(srcFileContents, normalizedValueAccessors[valueAccessorType], outputTarget.outputType); | ||
return { | ||
src: path.join(__dirname, '../resources/control-value-accessors/', rf), | ||
dest: path.join(directory, rf), | ||
src: path__default["default"].join(__dirname, '../resources/control-value-accessors/', rf), | ||
dest: path__default["default"].join(directory, rf), | ||
keepDirStructure: false, | ||
@@ -407,3 +413,3 @@ warn: false, | ||
}); | ||
return config.sys.copy(copyTasks, path.join(directory)); | ||
return config.sys.copy(copyTasks, path__default["default"].join(directory)); | ||
} | ||
@@ -452,4 +458,4 @@ const VALUE_ACCESSOR_SELECTORS = `<VALUE_ACCESSOR_SELECTORS>`; | ||
} | ||
const srcDirectory = path.join(__dirname, '..', 'angular-component-lib'); | ||
const destDirectory = path.join(path.dirname(outputTarget.directivesProxyFile), 'angular-component-lib'); | ||
const srcDirectory = path__default["default"].join(__dirname, '..', 'angular-component-lib'); | ||
const destDirectory = path__default["default"].join(path__default["default"].dirname(outputTarget.directivesProxyFile), 'angular-component-lib'); | ||
return config.sys.copy([ | ||
@@ -466,4 +472,4 @@ { | ||
function generateProxies(components, pkgData, outputTarget, rootDir) { | ||
const distTypesDir = path.dirname(pkgData.types); | ||
const dtsFilePath = path.join(rootDir, distTypesDir, GENERATED_DTS); | ||
const distTypesDir = path__default["default"].dirname(pkgData.types); | ||
const dtsFilePath = path__default["default"].join(rootDir, distTypesDir, GENERATED_DTS); | ||
const { outputType } = outputTarget; | ||
@@ -594,7 +600,7 @@ const componentsTypeFile = relativeImport(outputTarget.directivesProxyFile, dtsFilePath, '.d.ts'); | ||
} | ||
if (outputTarget.directivesProxyFile && !path.isAbsolute(outputTarget.directivesProxyFile)) { | ||
results.directivesProxyFile = normalizePath(path.join(config.rootDir, outputTarget.directivesProxyFile)); | ||
if (outputTarget.directivesProxyFile && !path__default["default"].isAbsolute(outputTarget.directivesProxyFile)) { | ||
results.directivesProxyFile = normalizePath(path__default["default"].join(config.rootDir, outputTarget.directivesProxyFile)); | ||
} | ||
if (outputTarget.directivesArrayFile && !path.isAbsolute(outputTarget.directivesArrayFile)) { | ||
results.directivesArrayFile = normalizePath(path.join(config.rootDir, outputTarget.directivesArrayFile)); | ||
if (outputTarget.directivesArrayFile && !path__default["default"].isAbsolute(outputTarget.directivesArrayFile)) { | ||
results.directivesArrayFile = normalizePath(path__default["default"].join(config.rootDir, outputTarget.directivesArrayFile)); | ||
} | ||
@@ -601,0 +607,0 @@ if (outputTarget.includeSingleComponentAngularModules !== undefined) { |
@@ -152,3 +152,3 @@ import path from 'path'; | ||
// If a member name includes a dash or a forward slash, we need to wrap it in quotes. | ||
// https://github.com/ionic-team/stencil-ds-output-targets/issues/212 | ||
// https://github.com/stenciljs/output-targets/issues/212 | ||
eventName = `'${prop.name}'`; | ||
@@ -155,0 +155,0 @@ } |
{ | ||
"name": "@stencil/angular-output-target", | ||
"version": "0.0.1-dev.11735332610.1971f219", | ||
"version": "0.0.1-dev.11741888614.1fd07d67", | ||
"description": "Angular output target for @stencil/core components.", | ||
@@ -42,3 +42,3 @@ "main": "dist/index.cjs.js", | ||
"type": "git", | ||
"url": "git+https://github.com/ionic-team/stencil-ds-output-targets.git" | ||
"url": "git+https://github.com/stenciljs/output-targets.git" | ||
}, | ||
@@ -49,3 +49,3 @@ "author": "Ionic Team", | ||
"bugs": { | ||
"url": "https://github.com/ionic-team/stencil-ds-output-targets/issues" | ||
"url": "https://github.com/stenciljs/output-targets/issues" | ||
}, | ||
@@ -55,2 +55,3 @@ "devDependencies": { | ||
"@angular/forms": "8.2.14", | ||
"@stencil/core": "^4.27.2", | ||
"@types/node": "^18.0.0", | ||
@@ -66,3 +67,3 @@ "npm-run-all2": "^6.2.4", | ||
}, | ||
"gitHead": "971f219ebe92260d416e7da4af036715b8009e9f" | ||
"gitHead": "fd07d673f05a09d222b263be6ad7c4308fda13a2" | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
110638
0.56%2129
0.14%9
12.5%1
Infinity%