@corva/create-app 0.123.0 → 0.125.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/common/ui/config/vite/corva-vite-config.mjs +551 -0
- package/common/ui/devApp.js +1 -0
- package/common/ui/index.html +17 -0
- package/common/ui/isolatedApp.js +1 -0
- package/common/ui/public/DevCenterIsolatedAppPage.html +26 -0
- package/common/ui/public/favicon.ico +0 -0
- package/common/ui/vite.config.mjs +4 -0
- package/common/ui/vitest.global-setup.js +4 -0
- package/common/ui/vitest.setup.js +26 -0
- package/lib/commands/create.js +4 -0
- package/lib/constants/package.js +26 -57
- package/lib/flows/steps/zip-file-list-resolve.js +9 -0
- package/lib/helpers/utils.js +2 -2
- package/package.json +1 -1
- package/template_extensions/corva/.eslintrc +4 -0
- package/template_extensions/corva/.github/workflows/feat-fix.yml +1 -0
- package/templates/ui/javascript/.eslintrc +7 -2
- package/templates/ui/javascript/AGENTS.md +13 -11
- package/templates/ui/javascript/src/{App.completion.js → App.completion.jsx} +3 -3
- package/templates/ui/javascript/src/{App.drilling.js → App.drilling.jsx} +3 -3
- package/templates/ui/javascript/src/{AppSettings.js → AppSettings.jsx} +1 -1
- package/templates/ui/javascript/src/__tests__/{AppSettings.test.js → AppSettings.test.jsx} +1 -1
- package/templates/ui/typescript/.eslintrc +4 -0
- package/templates/ui/typescript/AGENTS.md +11 -8
- package/templates/ui/typescript/src/App.completion.tsx +1 -1
- package/templates/ui/typescript/src/App.drilling.tsx +1 -1
- package/templates/ui/typescript/src/__tests__/AppSettings.test.tsx +1 -1
- package/templates/ui/typescript/tsconfig.json +17 -4
- package/templates/ui/javascript/config/jest/babelTransform.js +0 -16
- package/templates/ui/javascript/config/jest/cssTransform.js +0 -16
- package/templates/ui/javascript/config/jest/fileTransform.js +0 -48
- package/templates/ui/javascript/config/jest/globalSetup.js +0 -5
- package/templates/ui/javascript/config/jest/setupTests.js +0 -33
- package/templates/ui/javascript/config-overrides.js +0 -10
- package/templates/ui/typescript/config/jest/babelTransform.js +0 -16
- package/templates/ui/typescript/config/jest/cssTransform.js +0 -16
- package/templates/ui/typescript/config/jest/fileTransform.js +0 -48
- package/templates/ui/typescript/config/jest/globalSetup.js +0 -5
- package/templates/ui/typescript/config/jest/setupTests.js +0 -33
- package/templates/ui/typescript/config-overrides.js +0 -10
- /package/templates/ui/javascript/src/{App.scss → App.module.scss} +0 -0
- /package/templates/ui/javascript/src/__tests__/{App.test.js → App.test.jsx} +0 -0
- /package/templates/ui/javascript/src/__tests__/{TestsExample.test.js → TestsExample.test.jsx} +0 -0
- /package/templates/ui/typescript/src/{App.scss → App.module.scss} +0 -0
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
const path = require('path');
|
|
4
|
-
|
|
5
|
-
// This is a custom Jest transformer turning file imports into filenames.
|
|
6
|
-
// http://facebook.github.io/jest/docs/en/webpack.html
|
|
7
|
-
|
|
8
|
-
const toPascalCase = str => {
|
|
9
|
-
const allWordsIterator = str.matchAll(/\w+/g);
|
|
10
|
-
|
|
11
|
-
return Array.from(allWordsIterator).reduce((acc, matchResult) => {
|
|
12
|
-
const word = matchResult[0];
|
|
13
|
-
return acc + word[0].toUpperCase() + word.slice(1).toLowerCase();
|
|
14
|
-
}, '');
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
module.exports = {
|
|
18
|
-
process(src, filename) {
|
|
19
|
-
const assetFilename = JSON.stringify(path.basename(filename));
|
|
20
|
-
|
|
21
|
-
if (filename.match(/\.svg$/)) {
|
|
22
|
-
// Based on how SVGR generates a component name:
|
|
23
|
-
// https://github.com/smooth-code/svgr/blob/01b194cf967347d43d4cbe6b434404731b87cf27/packages/core/src/state.js#L6
|
|
24
|
-
const pascalCaseFilename = toPascalCase(path.parse(filename).name);
|
|
25
|
-
const componentName = `Svg${pascalCaseFilename}`;
|
|
26
|
-
return {
|
|
27
|
-
code: `const React = require('react');
|
|
28
|
-
module.exports = {
|
|
29
|
-
__esModule: true,
|
|
30
|
-
default: ${assetFilename},
|
|
31
|
-
ReactComponent: React.forwardRef(function ${componentName}(props, ref) {
|
|
32
|
-
return {
|
|
33
|
-
$$typeof: Symbol.for('react.element'),
|
|
34
|
-
type: 'svg',
|
|
35
|
-
ref: ref,
|
|
36
|
-
key: null,
|
|
37
|
-
props: Object.assign({}, props, {
|
|
38
|
-
children: ${assetFilename}
|
|
39
|
-
})
|
|
40
|
-
};
|
|
41
|
-
}),
|
|
42
|
-
};`,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return { code: `module.exports = ${assetFilename};` };
|
|
47
|
-
},
|
|
48
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
|
4
|
-
// allows you to do things like:
|
|
5
|
-
// expect(element).toHaveTextContent(/react/i)
|
|
6
|
-
// learn more: https://github.com/testing-library/jest-dom
|
|
7
|
-
// eslint-disable-next-line
|
|
8
|
-
import '@testing-library/jest-dom/extend-expect';
|
|
9
|
-
import { TextEncoder, TextDecoder } from 'util';
|
|
10
|
-
|
|
11
|
-
Object.assign(global, { TextDecoder, TextEncoder });
|
|
12
|
-
|
|
13
|
-
// Set UTC timezone for tests to not use the environment timezone
|
|
14
|
-
process.env.TZ = 'UTC';
|
|
15
|
-
|
|
16
|
-
// Mock ResizeObserver & MutationObserver
|
|
17
|
-
class FakeObserver {
|
|
18
|
-
observe() {}
|
|
19
|
-
unobserve() {}
|
|
20
|
-
disconnect() {}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
global.ResizeObserver = FakeObserver;
|
|
24
|
-
global.MutationObserver = FakeObserver;
|
|
25
|
-
|
|
26
|
-
// Suppressing "Could not parse CSS stylesheet" from JSDOM
|
|
27
|
-
const originalConsoleError = global.console.error;
|
|
28
|
-
global.console.error = (message, ...optionalParams) => {
|
|
29
|
-
if (message.includes('Could not parse CSS stylesheet')) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
originalConsoleError(message, ...optionalParams);
|
|
33
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const { getWebpackConfig } = require('@corva/dc-platform-shared/cjs');
|
|
2
|
-
const { merge } = require('webpack-merge');
|
|
3
|
-
|
|
4
|
-
module.exports = (env, argv) => {
|
|
5
|
-
return merge(
|
|
6
|
-
getWebpackConfig(env, argv),
|
|
7
|
-
// NOTE: Custom webpack 5 plugins and module rules can be provided here
|
|
8
|
-
{}
|
|
9
|
-
);
|
|
10
|
-
};
|
|
File without changes
|
|
File without changes
|
/package/templates/ui/javascript/src/__tests__/{TestsExample.test.js → TestsExample.test.jsx}
RENAMED
|
File without changes
|
|
File without changes
|