@ember/app-blueprint 0.8.2 → 6.6.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/.prettierignore +1 -2
- package/.release-plan.json +9 -5
- package/CHANGELOG.md +17 -0
- package/eslint.config.mjs +1 -5
- package/files/package.json +43 -43
- package/package.json +2 -2
- package/tests/arguments.test.mjs +155 -0
- package/tests/fixtures/tests-js-10/app/components/.gitkeep +0 -0
- package/tests/fixtures/tests-js-10/app/components/sweet.gjs +3 -0
- package/tests/{fixture → fixtures/tests-js-10}/app/router.js +2 -3
- package/tests/fixtures/tests-js-10/app/routes/.gitkeep +0 -0
- package/tests/{fixture/app/routes/styles.js → fixtures/tests-js-10/app/routes/fancy.js} +1 -1
- package/tests/fixtures/tests-js-10/app/styles/app.css +3 -0
- package/tests/fixtures/tests-js-10/app/templates/application.gjs +15 -0
- package/tests/fixtures/tests-js-10/app/templates/fancy.gjs +12 -0
- package/tests/fixtures/tests-js-10/tests/acceptance/index-test.js +26 -0
- package/tests/fixtures/tests-js-10/tests/integration/components/sweet-test.gjs +28 -0
- package/tests/fixtures/tests-js-10/tests/routes/fancy-test.js +11 -0
- package/tests/{fixture-ts/testem-proxy.js → fixtures/tests-js-20/testem-dev.js} +26 -2
- package/tests/fixtures/tests-ts-10/app/components/.gitkeep +0 -0
- package/tests/fixtures/tests-ts-10/app/components/sweet.gts +3 -0
- package/tests/{fixture-ts → fixtures/tests-ts-10}/app/router.ts +2 -3
- package/tests/fixtures/tests-ts-10/app/routes/.gitkeep +0 -0
- package/tests/{fixture-ts/app/routes/styles.ts → fixtures/tests-ts-10/app/routes/fancy.ts} +1 -1
- package/tests/fixtures/tests-ts-10/app/styles/app.css +3 -0
- package/tests/fixtures/tests-ts-10/app/templates/application.gts +15 -0
- package/tests/fixtures/tests-ts-10/app/templates/fancy.gts +12 -0
- package/tests/fixtures/tests-ts-10/tests/acceptance/index-test.ts +26 -0
- package/tests/fixtures/tests-ts-10/tests/integration/components/sweet-test.gjs +28 -0
- package/tests/fixtures/tests-ts-10/tests/routes/fancy-test.js +11 -0
- package/tests/generators.test.mjs +60 -0
- package/tests/helpers.mjs +26 -91
- package/tests/lint.test.mjs +27 -10
- package/tests/tests.test.mjs +218 -0
- package/vitest.config.ts +2 -2
- package/tests/default.test.mjs +0 -155
- package/tests/fixture/app/components/custom-component.hbs +0 -3
- package/tests/fixture/app/styles/app.css +0 -5
- package/tests/fixture/app/templates/application.hbs +0 -3
- package/tests/fixture/app/templates/custom-component.hbs +0 -1
- package/tests/fixture/app/templates/index.hbs +0 -1
- package/tests/fixture/app/templates/styles.hbs +0 -5
- package/tests/fixture/testem-proxy.js +0 -35
- package/tests/fixture/tests/acceptance/custom-component-test.js +0 -14
- package/tests/fixture/tests/acceptance/styles-test.js +0 -18
- package/tests/fixture-ts/app/styles/app.css +0 -5
- package/tests/fixture-ts/app/templates/components/custom.gts +0 -5
- package/tests/fixture-ts/app/templates/custom-component.gts +0 -5
- package/tests/fixture-ts/app/templates/index.gts +0 -5
- package/tests/fixture-ts/app/templates/styles.gts +0 -7
- package/tests/fixture-ts/tests/acceptance/custom-component-test.ts +0 -14
- package/tests/fixture-ts/tests/acceptance/styles-test.ts +0 -18
- package/tests/typescript.test.mjs +0 -24
- /package/tests/{fixture → fixtures/tests-js-10}/app/initializers/test-init.js +0 -0
- /package/tests/{fixture → fixtures/tests-js-10}/app/instance-initializers/test-instance-init.js +0 -0
- /package/tests/{fixture → fixtures/tests-js-10}/tests/acceptance/app-init-test.js +0 -0
- /package/tests/{fixture → fixtures/tests-js-10}/tests/acceptance/welcome-page-test.js +0 -0
- /package/tests/{fixture-ts → fixtures/tests-ts-10}/app/initializers/test-init.ts +0 -0
- /package/tests/{fixture-ts → fixtures/tests-ts-10}/app/instance-initializers/test-instance-init.ts +0 -0
- /package/tests/{fixture-ts → fixtures/tests-ts-10}/tests/acceptance/app-init-test.ts +0 -0
- /package/tests/{fixture-ts → fixtures/tests-ts-10}/tests/acceptance/welcome-page-test.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<CustomComponent />
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<WelcomePage />
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
const httpProxy = require('http-proxy');
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
This can be installed as a testem middleware to make testem run against an
|
|
5
|
-
arbitrary real webserver at targetURL.
|
|
6
|
-
|
|
7
|
-
It allows testem to handle the well-known testem-specific paths and proxies
|
|
8
|
-
everything else, while rewriting the testem-added prefix out of your
|
|
9
|
-
"/tests/index.html" URL.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
module.exports = function testemProxy(targetURL) {
|
|
13
|
-
return function testemProxyHandler(app) {
|
|
14
|
-
const proxy = httpProxy.createProxyServer({
|
|
15
|
-
changeOrigin: true,
|
|
16
|
-
ignorePath: true,
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
proxy.on('error', (err, _req, res) => {
|
|
20
|
-
res && res.status && res.status(500).json(err);
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
app.all('*', (req, res, next) => {
|
|
24
|
-
let url = req.url;
|
|
25
|
-
if (url === '/testem.js' || url.startsWith('/testem/')) {
|
|
26
|
-
return next();
|
|
27
|
-
}
|
|
28
|
-
let m = /^(\/\d+)\/tests\/index.html/.exec(url);
|
|
29
|
-
if (m) {
|
|
30
|
-
url = url.slice(m[1].length);
|
|
31
|
-
}
|
|
32
|
-
proxy.web(req, res, { target: targetURL + url });
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { module, test } from 'qunit';
|
|
2
|
-
import { visit, currentURL } from '@ember/test-helpers';
|
|
3
|
-
import { setupApplicationTest } from 'test-app/tests/helpers';
|
|
4
|
-
|
|
5
|
-
module('Acceptance | custom-component page', function (hooks) {
|
|
6
|
-
setupApplicationTest(hooks);
|
|
7
|
-
|
|
8
|
-
test('visiting /custom-component', async function (assert) {
|
|
9
|
-
await visit('/custom-component');
|
|
10
|
-
|
|
11
|
-
assert.strictEqual(currentURL(), '/custom-component');
|
|
12
|
-
assert.dom('#custom-component').containsText('I am a custom component');
|
|
13
|
-
});
|
|
14
|
-
})
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { module, test } from 'qunit';
|
|
2
|
-
import { visit } from '@ember/test-helpers';
|
|
3
|
-
import { setupApplicationTest } from 'test-app/tests/helpers';
|
|
4
|
-
|
|
5
|
-
module('Acceptance | styles', function (hooks) {
|
|
6
|
-
setupApplicationTest(hooks);
|
|
7
|
-
|
|
8
|
-
test('visiting /styles', async function (assert) {
|
|
9
|
-
await visit('/styles');
|
|
10
|
-
|
|
11
|
-
assert.dom('.styles-test').hasStyle(
|
|
12
|
-
{
|
|
13
|
-
'background-color': 'rgb(0, 0, 255)',
|
|
14
|
-
},
|
|
15
|
-
'The background should be blue if the app styles are working correctly',
|
|
16
|
-
);
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { module, test } from 'qunit';
|
|
2
|
-
import { visit, currentURL } from '@ember/test-helpers';
|
|
3
|
-
import { setupApplicationTest } from 'test-app/tests/helpers';
|
|
4
|
-
|
|
5
|
-
module('Acceptance | custom-component page', function (hooks) {
|
|
6
|
-
setupApplicationTest(hooks);
|
|
7
|
-
|
|
8
|
-
test('visiting /custom-component', async function (assert) {
|
|
9
|
-
await visit('/custom-component');
|
|
10
|
-
|
|
11
|
-
assert.strictEqual(currentURL(), '/custom-component');
|
|
12
|
-
assert.dom('#custom-component').containsText('I am a custom component');
|
|
13
|
-
});
|
|
14
|
-
})
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { module, test } from 'qunit';
|
|
2
|
-
import { visit } from '@ember/test-helpers';
|
|
3
|
-
import { setupApplicationTest } from 'test-app/tests/helpers';
|
|
4
|
-
|
|
5
|
-
module('Acceptance | styles', function (hooks) {
|
|
6
|
-
setupApplicationTest(hooks);
|
|
7
|
-
|
|
8
|
-
test('visiting /styles', async function (assert) {
|
|
9
|
-
await visit('/styles');
|
|
10
|
-
|
|
11
|
-
assert.dom('.styles-test').hasStyle(
|
|
12
|
-
{
|
|
13
|
-
'background-color': 'rgb(0, 0, 255)',
|
|
14
|
-
},
|
|
15
|
-
'The background should be blue if the app styles are working correctly',
|
|
16
|
-
);
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { join } from 'path';
|
|
3
|
-
import { existsSync } from 'fs';
|
|
4
|
-
import { newProjectWithFixtures } from './helpers.mjs';
|
|
5
|
-
|
|
6
|
-
describe('typescript', function () {
|
|
7
|
-
let project = newProjectWithFixtures({
|
|
8
|
-
fixturePath: join(__dirname, 'fixture-ts'),
|
|
9
|
-
flags: ['--typescript'],
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it('verify files', async function () {
|
|
13
|
-
expect(
|
|
14
|
-
existsSync(join(project.dir(), 'tsconfig.json')),
|
|
15
|
-
'the root tsconfig.json has been added',
|
|
16
|
-
);
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('glint passes', async function () {
|
|
20
|
-
let result = await project.execa('pnpm', ['glint']);
|
|
21
|
-
|
|
22
|
-
console.log(result.stdout);
|
|
23
|
-
});
|
|
24
|
-
});
|
|
File without changes
|
/package/tests/{fixture → fixtures/tests-js-10}/app/instance-initializers/test-instance-init.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/tests/{fixture-ts → fixtures/tests-ts-10}/app/instance-initializers/test-instance-init.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|