Socket
Socket
Sign inDemoInstall

@hashicorp/ember-cli-api-double

Package Overview
Dependencies
517
Maintainers
29
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.2 to 4.0.0

4

config/environment.js
'use strict';
module.exports = function(/* environment, appConfig */) {
return { };
module.exports = function (/* environment, appConfig */) {
return {};
};

@@ -11,6 +11,6 @@ 'use strict';

name: require('./package.json').name,
contentFor: function(type, config) {
contentFor: function (type, config) {
const name = this.name;
const addon = config[name] || {enabled: false};
if(addon.enabled) {
const addon = config[name] || { enabled: false };
if (addon.enabled) {
const cwd = process.cwd();

@@ -20,14 +20,14 @@ switch (type) {

const templates = [];
Object.keys(addon.endpoints).forEach(
function(key) {
const api = `${addon.endpoints[key]}`;
const absoluteAPI = `${cwd}/${api}`;
readdir(absoluteAPI).map(
function(item, i, arr) {
const url = item.replace(cwd, '');
templates.push(`<script type="text/javascript+template" data-url="${url}">${read(item)}</script>`);
}
Object.keys(addon.endpoints).forEach(function (key) {
const api = `${addon.endpoints[key]}`;
const absoluteAPI = `${cwd}/${api}`;
readdir(absoluteAPI).map(function (item, i, arr) {
const url = item.replace(cwd, '');
templates.push(
`<script type="text/javascript+template" data-url="${url}">${read(
item
)}</script>`
);
}
);
});
});
return templates.join('');

@@ -37,5 +37,5 @@ }

},
treeForApp: function(appTree) {
treeForApp: function (appTree) {
const config = this.app.project.config(this.app.env) || {};
const addon = config[this.name] || {enabled: false};
const addon = config[this.name] || { enabled: false };
// don't include anything if we aren't enabled

@@ -47,3 +47,3 @@ if (!addon.enabled) {

},
treeFor: function(name) {
treeFor: function (name) {
let app;

@@ -66,3 +66,3 @@

const config = app.project.config(app.env) || {};
const addon = config[this.name] || {enabled: false};
const addon = config[this.name] || { enabled: false };

@@ -75,4 +75,6 @@ // don't include anything if we aren't enabled

// include an initializer to initialize the shim http client
if(addon['auto-import'] !== false && name === 'app') {
const tree = writeFile('instance-initializers/ember-cli-api-double.js', `
if (addon['auto-import'] !== false && name === 'app') {
const tree = writeFile(
'instance-initializers/ember-cli-api-double.js',
`
import apiDouble from '@hashicorp/ember-cli-api-double';

@@ -84,7 +86,5 @@ apiDouble(JSON.parse('${JSON.stringify(addon)}'));

};
`);
return mergeTrees([
tree,
this._super.treeFor.apply(this, arguments)
]);
`
);
return mergeTrees([tree, this._super.treeFor.apply(this, arguments)]);
}

@@ -91,0 +91,0 @@ return this._super.treeFor.apply(this, arguments);

{
"name": "@hashicorp/ember-cli-api-double",
"version": "3.1.2",
"version": "4.0.0",
"description": "An ember-cli wrapper around @hashicorp/api-double",

@@ -8,14 +8,23 @@ "keywords": [

],
"repository": "https://github.com/hashicorp/ember-cli-api-double",
"license": "MPL-2.0",
"author": "",
"repository": "https://github.com/hashicorp/ember-cli-api-double",
"files": [
"addon/*",
"app/!(.gitkeep)",
"config/!(ember-try.js)",
"index.js"
],
"scripts": {
"build": "ember build",
"lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests",
"build": "ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "ember try:each"
"test": "npm-run-all lint test:*",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each"
},
"resolutions": {
"jquery": "^3.4.0"
},
"dependencies": {

@@ -26,4 +35,4 @@ "@hashicorp/api-double": "^1.6.1",

"broccoli-merge-trees": "^3.0.2",
"ember-auto-import": "^1.5.3",
"ember-cli-babel": "^6.6.0",
"ember-auto-import": "^2.4.2",
"ember-cli-babel": "^7.26.11",
"merge-options": "^1.0.1",

@@ -34,24 +43,38 @@ "pretender": "^3.2.0",

"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"ember-cli": "^3.15.2",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-eslint": "^4.2.1",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-qunit": "^4.4.0",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^2.0.0",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.0.0",
"ember-source": "~2.18.0",
"eslint-plugin-ember": "^5.0.0",
"eslint-plugin-node": "^5.2.1",
"loader.js": "^4.2.3"
"@ember/optional-features": "^1.3.0",
"@ember/test-helpers": "^2.8.1",
"@embroider/test-setup": "^1.8.3",
"@glimmer/component": "^1.0.0",
"@glimmer/tracking": "^1.0.0",
"broccoli-asset-rev": "^3.0.0",
"ember-cli": "^4.6.0",
"ember-cli-dependency-checker": "^3.3.1",
"ember-cli-htmlbars": "^6.1.0",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-load-initializers": "^2.1.2",
"ember-page-title": "^7.0.0",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.3",
"ember-source": "~4.6.0",
"ember-template-lint": "^4.10.1",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-ember": "^11.0.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-qunit": "^7.3.1",
"loader.js": "^4.2.3",
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
"qunit": "^2.19.1",
"webpack": "^5.74.0"
},
"engines": {
"node": "^4.5 || 6.* || >= 7.*"
"node": "14.* || >= 16"
},
"ember": {
"edition": "octane"
},
"ember-addon": {

@@ -58,0 +81,0 @@ "configPath": "tests/dummy/config"

@@ -1,2 +0,2 @@

# ember-cli-api-double
# @hashicorp/ember-cli-api-double

@@ -14,2 +14,1 @@ An ember-cli wrapper around [@hashicorp/api-double](https://github.com/hashicorp/api-double/)

- Usage within the [Consul UI](https://github.com/hashicorp/consul/tree/master/ui-v2)
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc