vault/ui/ember-cli-build.js
Zack Moore e6ce95acd3
Replace codemirror 6 code editor with HDS CodeEditor component (#30188)
* Completed initial replacement of editor

* fixing ts issues

* removing codemirror modifier and deps

* working on replacing the code editor

* addressing linting concerns

* cleaning up policy-form editor

* fixing linting issues

* fixing linting issues

* fixing tests

* fixing tests

* fixing tests

* fixing tests

* fixing failing tests

* cleaning up PR

* fixing tests

* remove outdated message for navigating editor

* fix linting in tests

* add changelog

* fix tests

* update naming

* remove unused lint param + name changes

* update test selector usage

* update test selector usage

* update test selector usage

* lint fixes

* replace page object selectors

* lint fix

* fix lint

* fix lint after merge

* update tests

* remove import

---------

Co-authored-by: Lane Wetmore <lane.wetmore@hashicorp.com>
2025-07-23 11:12:20 -07:00

94 lines
2.4 KiB
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
/* eslint-env node */
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const config = require('./config/environment')();
const environment = EmberApp.env();
const isProd = environment === 'production';
const isTest = environment === 'test';
// const isCI = !!process.env.CI;
const appConfig = {
'ember-service-worker': {
serviceWorkerScope: config.serviceWorkerScope,
skipWaitingOnMessage: true,
},
babel: {
plugins: [require.resolve('ember-concurrency/async-arrow-task-transform')],
},
fingerprint: {
exclude: ['images/'],
},
assetLoader: {
generateURI: function (filePath) {
return `${config.rootURL.replace(/\/$/, '')}${filePath}`;
},
},
'ember-cli-babel': {
enableTypeScriptTransform: true,
throwUnlessParallelizable: true,
},
hinting: isTest,
tests: isTest,
sourcemaps: {
enabled: !isProd,
},
sassOptions: {
sourceMap: false,
onlyIncluded: true,
quietDeps: true, // silences deprecation warnings from dependencies
precision: 4,
includePaths: [
'./node_modules/@hashicorp/design-system-components/dist/styles',
'./node_modules/@hashicorp/design-system-tokens/dist/products/css',
'./node_modules/ember-basic-dropdown/',
'./node_modules/ember-power-select/',
'./node_modules/@hashicorp/vault-reporting/dist/styles',
],
},
minifyCSS: {
options: {
advanced: false,
},
},
autoprefixer: {
enabled: isTest || isProd,
grid: true,
browsers: ['defaults'],
},
autoImport: {
forbidEval: true,
},
'ember-test-selectors': {
strip: isProd,
},
'ember-composable-helpers': {
except: ['array'],
},
'ember-cli-deprecation-workflow': {
enabled: true,
},
};
module.exports = function (defaults) {
const app = new EmberApp(defaults, appConfig);
app.import('node_modules/jsonlint/lib/jsonlint.js');
app.import('node_modules/text-encoder-lite/text-encoder-lite.js');
app.import('node_modules/jsondiffpatch/dist/jsondiffpatch.umd.js');
app.import('node_modules/jsondiffpatch/dist/formatters-styles/html.css');
app.import('app/styles/bulma/bulma-radio-checkbox.css');
app.import(
'node_modules/@hashicorp/design-system-components/dist/styles/@hashicorp/design-system-components.css'
);
return app.toTree();
};