@embroider/core 3.4.20-unstable.b89b741 → 3.4.20-unstable.c3af848
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/package.json +6 -6
- package/src/index.d.ts +2 -2
- package/src/index.js +1 -2
- package/src/index.js.map +1 -1
- package/src/module-request.d.ts +5 -6
- package/src/module-request.js +11 -2
- package/src/module-request.js.map +1 -1
- package/src/module-resolver.d.ts +3 -1
- package/src/module-resolver.js +130 -108
- package/src/module-resolver.js.map +1 -1
- package/src/node-resolve.d.ts +2 -1
- package/src/node-resolve.js +6 -8
- package/src/node-resolve.js.map +1 -1
- package/src/packager.d.ts +0 -8
- package/src/packager.js +0 -9
- package/src/packager.js.map +1 -1
- package/src/virtual-content.d.ts +28 -10
- package/src/virtual-content.js +45 -114
- package/src/virtual-content.js.map +1 -1
- package/src/virtual-entrypoint.d.ts +4 -2
- package/src/virtual-entrypoint.js +2 -18
- package/src/virtual-entrypoint.js.map +1 -1
- package/src/virtual-route-entrypoint.d.ts +4 -9
- package/src/virtual-route-entrypoint.js +1 -33
- package/src/virtual-route-entrypoint.js.map +1 -1
- package/src/virtual-test-support-styles.d.ts +5 -2
- package/src/virtual-test-support-styles.js +2 -5
- package/src/virtual-test-support-styles.js.map +1 -1
- package/src/virtual-test-support.d.ts +5 -2
- package/src/virtual-test-support.js +2 -5
- package/src/virtual-test-support.js.map +1 -1
- package/src/virtual-vendor-styles.d.ts +5 -1
- package/src/virtual-vendor-styles.js +2 -1
- package/src/virtual-vendor-styles.js.map +1 -1
- package/src/virtual-vendor.d.ts +5 -2
- package/src/virtual-vendor.js +4 -8
- package/src/virtual-vendor.js.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"virtual-route-entrypoint.js","sourceRoot":"","sources":["virtual-route-entrypoint.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"virtual-route-entrypoint.js","sourceRoot":"","sources":["virtual-route-entrypoint.ts"],"names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AC;QACH,CAAC,CACF,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAC9B,CAAC;AAED,MAAM,kBAAkB,GAAG,IAAA,uBAAO,EAAC;;;;;;;;;;;;;;;;CAgBlC,CAGW,CAAC","sourcesContent":["import type { V2AddonPackage } from '@embroider/shared-internals/src/package';\nimport { AppFiles } from './app-files';\nimport type { Resolver } from './module-resolver';\nimport { compile } from './js-handlebars';\nimport { extensionsPattern } from '@embroider/shared-internals';\nimport { partition } from 'lodash';\nimport { getAppFiles, getFastbootFiles, importPaths, splitRoute, staticAppPathsPattern } from './virtual-entrypoint';\n\nexport interface RouteEntrypointResponse {\n type: 'route-entrypoint';\n fromDir: string;\n route: string;\n}\n\nexport function renderRouteEntrypoint(\n { fromDir, route }: RouteEntrypointResponse,\n resolver: Resolver\n): { src: string; watches: string[] } {\n const owner = resolver.packageCache.ownerOfFile(fromDir);\n\n if (!owner) {\n throw new Error('Owner expected'); // ToDo: Really bad error, update message\n }\n\n let engine = resolver.owningEngine(owner);\n let isApp = owner?.root === resolver.options.engines[0]!.root;\n let hasFastboot = Boolean(resolver.options.engines[0]!.activeAddons.find(a => a.name === 'ember-cli-fastboot'));\n\n let appFiles = new AppFiles(\n {\n package: owner,\n addons: new Map(\n engine.activeAddons.map(addon => [\n resolver.packageCache.get(addon.root) as V2AddonPackage,\n addon.canResolveFromFile,\n ])\n ),\n isApp,\n modulePrefix: isApp ? resolver.options.modulePrefix : engine.packageName,\n appRelativePath: 'NOT_USED_DELETE_ME',\n },\n getAppFiles(fromDir),\n hasFastboot ? getFastbootFiles(owner.root) : new Set(),\n extensionsPattern(resolver.options.resolvableExtensions),\n staticAppPathsPattern(resolver.options.staticAppPaths),\n resolver.options.podModulePrefix\n );\n\n let src = '';\n\n for (let [routeName, routeFiles] of appFiles.routeFiles.children) {\n splitRoute(\n routeName,\n routeFiles,\n resolver.options.splitAtRoutes,\n (_: string, _filename: string) => {\n // noop\n },\n (routeNames: string[], routeFiles: string[]) => {\n if (routeNames[0] === route) {\n let [fastboot, nonFastboot] = partition(routeFiles, file => appFiles.isFastbootOnly.get(file));\n\n const amdModules = nonFastboot.map(f => importPaths(resolver, appFiles, f));\n const fastbootOnlyAmdModules = fastboot.map(f => importPaths(resolver, appFiles, f));\n\n src = routeEntryTemplate({\n amdModules,\n fastbootOnlyAmdModules,\n });\n }\n }\n );\n }\n\n return { src, watches: [] };\n}\n\nconst routeEntryTemplate = compile(`\nconst output = {};\nexport default output;\n\n{{#each amdModules as |amdModule index| ~}}\n import * as amdModule{{index}} from \"{{js-string-escape amdModule.buildtime}}\"\n output[\"{{js-string-escape amdModule.runtime}}\"] = amdModule{{index}};\n{{/each}}\n\n{{#if fastbootOnlyAmdModules}}\n if (macroCondition(getGlobalConfig().fastboot?.isRunning)) {\n {{#each fastbootOnlyAmdModules as |amdModule| ~}}\n output[\"{{js-string-escape amdModule.runtime}}\"] = await import(\"{{js-string-escape amdModule.buildtime}}\");\n {{/each}}\n }\n{{/if}}\n`) as (params: {\n amdModules: { runtime: string; buildtime: string }[];\n fastbootOnlyAmdModules: { runtime: string; buildtime: string }[];\n}) => string;\n"]}
|
@@ -1,4 +1,7 @@
|
|
1
1
|
import type { Resolver } from './module-resolver';
|
2
2
|
import type { VirtualContentResult } from './virtual-content';
|
3
|
-
export
|
4
|
-
|
3
|
+
export interface TestSupportStylesResponse {
|
4
|
+
type: 'test-support-css';
|
5
|
+
specifier: string;
|
6
|
+
}
|
7
|
+
export declare function renderTestSupportStyles(response: TestSupportStylesResponse, resolver: Resolver): VirtualContentResult;
|
@@ -3,15 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.decodeTestSupportStyles = decodeTestSupportStyles;
|
7
6
|
exports.renderTestSupportStyles = renderTestSupportStyles;
|
8
7
|
const fs_1 = require("fs");
|
9
8
|
const lodash_1 = require("lodash");
|
10
9
|
const resolve_1 = __importDefault(require("resolve"));
|
11
|
-
function
|
12
|
-
|
13
|
-
}
|
14
|
-
function renderTestSupportStyles(filename, resolver) {
|
10
|
+
function renderTestSupportStyles(response, resolver) {
|
11
|
+
const filename = response.specifier;
|
15
12
|
const owner = resolver.packageCache.ownerOfFile(filename);
|
16
13
|
if (!owner) {
|
17
14
|
throw new Error(`Failed to find a valid owner for ${filename}`);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"virtual-test-support-styles.js","sourceRoot":"","sources":["virtual-test-support-styles.ts"],"names":[],"mappings":";;;;;
|
1
|
+
{"version":3,"file":"virtual-test-support-styles.js","sourceRoot":"","sources":["virtual-test-support-styles.ts"],"names":[],"mappings":";;;;;AAcA,0DAOC;AAnBD,2BAAkC;AAClC,mCAAgC;AAChC,sDAA8B;AAU9B,SAAgB,uBAAuB,CAAC,QAAmC,EAAE,QAAkB;IAC7F,MAAM,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC;IACpC,MAAM,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC1D,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,oCAAoC,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,oBAAoB,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AACrE,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAc,EAAE,QAAkB;IAC9D,IAAI,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAChD,IAAI,MAAM,GAAW;QACnB,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,IAAI,GAAG,CACb,YAAY,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE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C/B,MAAM,CAAC,IAAI,CAAC,iBAAO,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;YAC1C,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import type { Package } from '@embroider/shared-internals';\nimport type { V2AddonPackage } from '@embroider/shared-internals/src/package';\nimport { readFileSync } from 'fs';\nimport { sortBy } from 'lodash';\nimport resolve from 'resolve';\nimport type { Engine } from './app-files';\nimport type { Resolver } from './module-resolver';\nimport type { VirtualContentResult } from './virtual-content';\n\nexport interface TestSupportStylesResponse {\n type: 'test-support-css';\n specifier: string;\n}\n\nexport function renderTestSupportStyles(response: TestSupportStylesResponse, resolver: Resolver): VirtualContentResult {\n const filename = response.specifier;\n const owner = resolver.packageCache.ownerOfFile(filename);\n if (!owner) {\n throw new Error(`Failed to find a valid owner for ${filename}`);\n }\n return { src: getTestSupportStyles(owner, resolver), watches: [] };\n}\n\nfunction getTestSupportStyles(owner: Package, resolver: Resolver): string {\n let engineConfig = resolver.owningEngine(owner);\n let engine: Engine = {\n package: owner,\n addons: new Map(\n engineConfig.activeAddons.map(addon => [\n resolver.packageCache.get(addon.root) as V2AddonPackage,\n addon.canResolveFromFile,\n ])\n ),\n isApp: true,\n modulePrefix: resolver.options.modulePrefix,\n appRelativePath: 'NOT_USED_DELETE_ME',\n };\n\n return generateTestSupportStyles(engine);\n}\n\nfunction generateTestSupportStyles(engine: Engine): string {\n let result: string[] = impliedAddonTestSupportStyles(engine).map((sourcePath: string): string => {\n let source = readFileSync(sourcePath);\n return `${source}`;\n });\n\n return result.join('') as string;\n}\n\nfunction impliedAddonTestSupportStyles(engine: Engine): string[] {\n let result: Array<string> = [];\n for (let addon of sortBy(Array.from(engine.addons.keys()), pkg => {\n switch (pkg.name) {\n case 'loader.js':\n return 0;\n case 'ember-source':\n return 10;\n default:\n return 1000;\n }\n })) {\n let implicitStyles = addon.meta['implicit-test-styles'];\n if (implicitStyles) {\n let options = { basedir: addon.root };\n for (let mod of implicitStyles) {\n result.push(resolve.sync(mod, options));\n }\n }\n }\n return result;\n}\n"]}
|
@@ -1,4 +1,7 @@
|
|
1
1
|
import type { Resolver } from './module-resolver';
|
2
2
|
import type { VirtualContentResult } from './virtual-content';
|
3
|
-
export
|
4
|
-
|
3
|
+
export interface TestSupportResponse {
|
4
|
+
type: 'test-support-js';
|
5
|
+
specifier: string;
|
6
|
+
}
|
7
|
+
export declare function renderImplicitTestScripts(response: TestSupportResponse, resolver: Resolver): VirtualContentResult;
|
@@ -3,14 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.decodeImplicitTestScripts = decodeImplicitTestScripts;
|
7
6
|
exports.renderImplicitTestScripts = renderImplicitTestScripts;
|
8
7
|
const fs_1 = require("fs");
|
9
8
|
const resolve_1 = __importDefault(require("resolve"));
|
10
|
-
function
|
11
|
-
|
12
|
-
}
|
13
|
-
function renderImplicitTestScripts(filename, resolver) {
|
9
|
+
function renderImplicitTestScripts(response, resolver) {
|
10
|
+
const filename = response.specifier;
|
14
11
|
const owner = resolver.packageCache.ownerOfFile(filename);
|
15
12
|
if (!owner) {
|
16
13
|
throw new Error(`Failed to find a valid owner for ${filename}`);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"virtual-test-support.js","sourceRoot":"","sources":["virtual-test-support.ts"],"names":[],"mappings":";;;;;
|
1
|
+
{"version":3,"file":"virtual-test-support.js","sourceRoot":"","sources":["virtual-test-support.ts"],"names":[],"mappings":";;;;;AAaA,8DAOC;AAlBD,2BAAkC;AAClC,sDAA8B;AAU9B,SAAgB,yBAAyB,CAAC,QAA6B,EAAE,QAAkB;IACzF,MAAM,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC;IACpC,MAAM,KAAK,GAAG,QAAQ,CAAC,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;IAC1B,MAAM,CAAC,IAAI,CAAC;;;;EAIZ,CAAC,CAAC;IAEF,yEAAyE;IACzE,kEAAkE;IAClE,IAAI,CAAC,6BAA6B,EAAE,CAAC;QACnC,MAAM,CAAC,OAAO,CAAC,GAAG,IAAA,iBAAY,EAAC,OAAO,CAAC,OAAO,CAAC,4DAA4D,CAAC,CAAC,EAAE,CAAC,CAAC;IACnH,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAW,CAAC;AACnC,CAAC;AAED,SAAS,uBAAuB,CAAC,MAAc;IAC7C,IAAI,MAAM,GAAkB,EAAE,CAAC;IAC/B,KAAK,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;QACnD,IAAI,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;QAC1D,IAAI,eAAe,EAAE,CAAC;YACpB,IAAI,OAAO,GAAG,EAAE,OAAO,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;YACtC,KAAK,IAAI,GAAG,IAAI,eAAe,EAAE,CAAC;gBAChC,MAAM,CAAC,IAAI,CAAC,iBAAO,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;YAC1C,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import type { Package } from '@embroider/shared-internals';\nimport type { V2AddonPackage } from '@embroider/shared-internals/src/package';\nimport { readFileSync } from 'fs';\nimport resolve from 'resolve';\nimport type { Engine } from './app-files';\nimport type { Resolver } from './module-resolver';\nimport type { VirtualContentResult } from './virtual-content';\n\nexport interface TestSupportResponse {\n type: 'test-support-js';\n specifier: string;\n}\n\nexport function renderImplicitTestScripts(response: TestSupportResponse, resolver: Resolver): VirtualContentResult {\n const filename = response.specifier;\n const owner = resolver.packageCache.ownerOfFile(filename);\n if (!owner) {\n throw new Error(`Failed to find a valid owner for ${filename}`);\n }\n return { src: getTestSupport(owner, resolver), watches: [] };\n}\n\nfunction getTestSupport(owner: Package, resolver: Resolver): string {\n let engineConfig = resolver.owningEngine(owner);\n let engine: Engine = {\n package: owner,\n addons: new Map(\n engineConfig.activeAddons.map(addon => [\n resolver.packageCache.get(addon.root) as V2AddonPackage,\n addon.canResolveFromFile,\n ])\n ),\n isApp: true,\n modulePrefix: resolver.options.modulePrefix,\n appRelativePath: 'NOT_USED_DELETE_ME',\n };\n\n return generateTestSupport(engine);\n}\n\nfunction generateTestSupport(engine: Engine): string {\n // Add classic addons test-support\n let result: string[] = impliedAddonTestSupport(engine);\n let hasEmbroiderMacrosTestSupport = result.find(sourcePath =>\n sourcePath.endsWith('embroider-macros-test-support.js')\n );\n result = result.map((sourcePath: string): string => {\n let source = readFileSync(sourcePath);\n return `${source}`;\n });\n\n // Add _testing_suffix_.js\n result.push(`\nvar runningTests=true;\nif (typeof Testem !== 'undefined' && (typeof QUnit !== 'undefined' || typeof Mocha !== 'undefined')) {\n Testem.hookIntoTestFramework();\n}`);\n\n // whether or not anybody was actually using @embroider/macros explicitly\n // as an addon, we ensure its test-support file is always present.\n if (!hasEmbroiderMacrosTestSupport) {\n result.unshift(`${readFileSync(require.resolve('@embroider/macros/src/vendor/embroider-macros-test-support'))}`);\n }\n\n return result.join('') as string;\n}\n\nfunction impliedAddonTestSupport(engine: Engine): string[] {\n let result: Array<string> = [];\n for (let addon of Array.from(engine.addons.keys())) {\n let implicitScripts = addon.meta['implicit-test-scripts'];\n if (implicitScripts) {\n let options = { basedir: addon.root };\n for (let mod of implicitScripts) {\n result.push(resolve.sync(mod, options));\n }\n }\n }\n return result;\n}\n"]}
|
@@ -1,4 +1,8 @@
|
|
1
1
|
import type { Resolver } from './module-resolver';
|
2
2
|
import type { VirtualContentResult } from './virtual-content';
|
3
|
+
export interface VirtualVendorStylesResponse {
|
4
|
+
type: 'vendor-css';
|
5
|
+
specifier: string;
|
6
|
+
}
|
3
7
|
export declare function decodeVirtualVendorStyles(filename: string): boolean;
|
4
|
-
export declare function renderVendorStyles(
|
8
|
+
export declare function renderVendorStyles(response: VirtualVendorStylesResponse, resolver: Resolver): VirtualContentResult;
|
@@ -11,7 +11,8 @@ const resolve_1 = __importDefault(require("resolve"));
|
|
11
11
|
function decodeVirtualVendorStyles(filename) {
|
12
12
|
return filename.endsWith('-embroider-vendor-styles.css');
|
13
13
|
}
|
14
|
-
function renderVendorStyles(
|
14
|
+
function renderVendorStyles(response, resolver) {
|
15
|
+
const filename = response.specifier;
|
15
16
|
const owner = resolver.packageCache.ownerOfFile(filename);
|
16
17
|
if (!owner) {
|
17
18
|
throw new Error(`Failed to find a valid owner for ${filename}`);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"virtual-vendor-styles.js","sourceRoot":"","sources":["virtual-vendor-styles.ts"],"names":[],"mappings":";;;;;
|
1
|
+
{"version":3,"file":"virtual-vendor-styles.js","sourceRoot":"","sources":["virtual-vendor-styles.ts"],"names":[],"mappings":";;;;;AAcA,8DAEC;AAED,gDAOC;AAvBD,2BAAkC;AAClC,mCAAgC;AAChC,sDAA8B;AAU9B,SAAgB,yBAAyB,CAAC,QAAgB;IACxD,OAAO,QAAQ,CAAC,QAAQ,CAAC,8BAA8B,CAAC,CAAC;AAC3D,CAAC;AAED,SAAgB,kBAAkB,CAAC,QAAqC,EAAE,QAAkB;IAC1F,MAAM,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC;IACpC,MAAM,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC1D,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,oCAAoC,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAChE,CAAC;AAED,S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@embroider/shared-internals/src/package';\nimport { readFileSync } from 'fs';\nimport { sortBy } from 'lodash';\nimport resolve from 'resolve';\nimport type { Resolver } from './module-resolver';\nimport type { VirtualContentResult } from './virtual-content';\nimport type { Engine } from './app-files';\n\nexport interface VirtualVendorStylesResponse {\n type: 'vendor-css';\n specifier: string;\n}\n\nexport function decodeVirtualVendorStyles(filename: string): boolean {\n return filename.endsWith('-embroider-vendor-styles.css');\n}\n\nexport function renderVendorStyles(response: VirtualVendorStylesResponse, resolver: Resolver): VirtualContentResult {\n const filename = response.specifier;\n const owner = resolver.packageCache.ownerOfFile(filename);\n if (!owner) {\n throw new Error(`Failed to find a valid owner for ${filename}`);\n }\n return { src: getVendorStyles(owner, resolver), watches: [] };\n}\n\nfunction getVendorStyles(owner: Package, resolver: Resolver): string {\n let engineConfig = resolver.owningEngine(owner);\n let engine: Engine = {\n package: owner,\n addons: new Map(\n engineConfig.activeAddons.map(addon => [\n resolver.packageCache.get(addon.root) as V2AddonPackage,\n addon.canResolveFromFile,\n ])\n ),\n isApp: engineConfig.root === resolver.options.engines[0].root,\n modulePrefix: resolver.options.modulePrefix,\n appRelativePath: 'NOT_USED_DELETE_ME',\n };\n\n return generateVendorStyles(engine);\n}\n\nfunction generateVendorStyles(engine: Engine): string {\n let result: string[] = impliedAddonVendorStyles(engine).map(sourcePath => readFileSync(sourcePath, 'utf-8'));\n\n // add the engines own styles but only if it is not the top-level app, that is provided by @embroider/synthesized-styles\n if (!engine.isApp) {\n let engineStyles = [];\n\n engineStyles = getAddonImplicitStyles(engine.package as V2AddonPackage).map(sourcePath =>\n readFileSync(sourcePath, 'utf-8')\n );\n\n // add engine's own implicit styles after all vendor styles\n if (engineStyles.length) {\n result = [...result, ...engineStyles];\n }\n }\n\n return result.join('') as string;\n}\n\nfunction impliedAddonVendorStyles(engine: Engine): string[] {\n let result: Array<string> = [];\n for (let addon of sortBy(Array.from(engine.addons.keys()), pkg => {\n switch (pkg.name) {\n case 'loader.js':\n return 0;\n case 'ember-source':\n return 10;\n default:\n return 1000;\n }\n })) {\n // exclude lazy engines because they will handle their own css importation\n if (addon.isLazyEngine()) {\n continue;\n }\n\n let styles = getAddonImplicitStyles(addon);\n\n if (styles.length) {\n result = [...styles, ...result];\n }\n }\n return result;\n}\n\nfunction getAddonImplicitStyles(pkg: V2AddonPackage): string[] {\n let implicitStyles = pkg.meta['implicit-styles'];\n let styles = [];\n if (implicitStyles) {\n let options = { basedir: pkg.root };\n for (let mod of implicitStyles) {\n styles.push(resolve.sync(mod, options));\n }\n }\n return styles;\n}\n"]}
|
package/src/virtual-vendor.d.ts
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
import type { Resolver } from './module-resolver';
|
2
2
|
import type { VirtualContentResult } from './virtual-content';
|
3
|
-
export
|
4
|
-
|
3
|
+
export interface VirtualVendorResponse {
|
4
|
+
type: 'vendor-js';
|
5
|
+
specifier: string;
|
6
|
+
}
|
7
|
+
export declare function renderVendor(response: VirtualVendorResponse, resolver: Resolver): VirtualContentResult;
|
package/src/virtual-vendor.js
CHANGED
@@ -3,21 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.decodeVirtualVendor = decodeVirtualVendor;
|
7
6
|
exports.renderVendor = renderVendor;
|
8
7
|
const shared_internals_1 = require("@embroider/shared-internals");
|
9
8
|
const fs_extra_1 = require("fs-extra");
|
10
9
|
const path_1 = require("path");
|
11
10
|
const resolve_1 = __importDefault(require("resolve"));
|
12
|
-
function
|
13
|
-
|
14
|
-
}
|
15
|
-
function renderVendor(filename, resolver) {
|
16
|
-
const owner = resolver.packageCache.ownerOfFile(filename);
|
11
|
+
function renderVendor(response, resolver) {
|
12
|
+
const owner = resolver.packageCache.ownerOfFile(response.specifier);
|
17
13
|
if (!owner) {
|
18
|
-
throw new Error(`Failed to find a valid owner for ${
|
14
|
+
throw new Error(`Failed to find a valid owner for ${response.specifier}`);
|
19
15
|
}
|
20
|
-
return { src: getVendor(owner, resolver,
|
16
|
+
return { src: getVendor(owner, resolver, response.specifier), watches: [] };
|
21
17
|
}
|
22
18
|
function getVendor(owner, resolver, filename) {
|
23
19
|
let engineConfig = resolver.owningEngine(owner);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"virtual-vendor.js","sourceRoot":"","sources":["virtual-vendor.ts"],"names":[],"mappings":";;;;;
|
1
|
+
{"version":3,"file":"virtual-vendor.js","sourceRoot":"","sources":["virtual-vendor.ts"],"names":[],"mappings":";;;;;AAaA,oCAMC;AAnBD,kEAAsF;AAEtF,uCAAiE;AACjE,+BAA4B;AAC5B,sDAA8B;AAS9B,SAAgB,YAAY,CAAC,QAA+B,EAAE,QAAkB;IAC9E,MAAM,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACpE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,oCAAoC,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC;IAC5E,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAC9E,CAAC;AAED,SAAS,SAAS,CAAC,KAAc,EAAE,QAAkB,EAAE,QAAgB;IACrE,IAAI,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAChD,IAAI,MAAM,GAAG,YAAY,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAmB,CAAC,CAAC;IAE7G,IAAI,IAAI,GAAG,IAAA,WAAI,EAAC,IAAA,4CAAyB,EAAC,QAAQ,CAAC,OAA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IAAI,CAAC,iBAAO,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;YAC1C,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import { type Package, locateEmbroiderWorkingDir } from '@embroider/shared-internals';\nimport type { V2AddonPackage } from '@embroider/shared-internals/src/package';\nimport { lstatSync, readFileSync, readJSONSync } from 'fs-extra';\nimport { join } from 'path';\nimport resolve from 'resolve';\nimport type { Resolver } from './module-resolver';\nimport type { VirtualContentResult } from './virtual-content';\n\nexport interface VirtualVendorResponse {\n type: 'vendor-js';\n specifier: string;\n}\n\nexport function renderVendor(response: VirtualVendorResponse, resolver: Resolver): VirtualContentResult {\n const owner = resolver.packageCache.ownerOfFile(response.specifier);\n if (!owner) {\n throw new Error(`Failed to find a valid owner for ${response.specifier}`);\n }\n return { src: getVendor(owner, resolver, response.specifier), watches: [] };\n}\n\nfunction getVendor(owner: Package, resolver: Resolver, filename: string): string {\n let engineConfig = resolver.owningEngine(owner);\n let addons = engineConfig.activeAddons.map(addon => resolver.packageCache.get(addon.root) as V2AddonPackage);\n\n let path = join(locateEmbroiderWorkingDir(resolver.options.appRoot), 'ember-env.json');\n if (!lstatSync(path).isFile()) {\n throw new Error(`Failed to read the ember-env.json when generating content for ${filename}`);\n }\n let emberENV = readJSONSync(path);\n\n return generateVendor(addons, emberENV);\n}\n\nfunction generateVendor(addons: V2AddonPackage[], emberENV?: unknown): string {\n // Add addons implicit-scripts\n let vendor: string[] = impliedAddonVendors(addons).map((sourcePath: string): string => {\n let source = readFileSync(sourcePath);\n return `${source}`;\n });\n // Add _testing_prefix_.js\n vendor.unshift(`var runningTests=false;`);\n // Add _ember_env_.js\n vendor.unshift(`window.EmberENV={ ...(window.EmberENV || {}), ...${JSON.stringify(emberENV, null, 2)} };`);\n\n return vendor.join('') as string;\n}\n\nfunction impliedAddonVendors(addons: V2AddonPackage[]): string[] {\n let result: Array<string> = [];\n for (let addon of addons) {\n let implicitScripts = addon.meta['implicit-scripts'];\n if (implicitScripts) {\n let options = { basedir: addon.root };\n for (let mod of implicitScripts) {\n result.push(resolve.sync(mod, options));\n }\n }\n }\n return result;\n}\n"]}
|