@loomweaver/devkit 0.7.2 → 0.7.3
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 +5 -3
- package/package.json +1 -1
- package/src/generators/distribution/generator.js +8 -0
- package/src/generators/distribution/generator.js.map +1 -1
- package/src/generators/shared.d.ts +2 -10
- package/src/generators/shared.js +22 -10
- package/src/generators/shared.js.map +1 -1
- package/src/index.d.ts +5 -1
- package/src/index.js +13 -1
- package/src/index.js.map +1 -1
- package/src/lib/amend/compose.d.ts +12 -0
- package/src/lib/amend/compose.js +64 -0
- package/src/lib/amend/compose.js.map +1 -0
- package/src/lib/amend/describe.d.ts +7 -0
- package/src/lib/amend/describe.js +46 -0
- package/src/lib/amend/describe.js.map +1 -0
- package/src/lib/amend/merge.d.ts +14 -0
- package/src/lib/amend/merge.js +142 -0
- package/src/lib/amend/merge.js.map +1 -0
- package/src/lib/amend/types.d.ts +67 -0
- package/src/lib/amend/types.js +3 -0
- package/src/lib/amend/types.js.map +1 -0
- package/src/lib/generate/generate.d.ts +2 -0
- package/src/lib/generate/generate.js +5 -0
- package/src/lib/generate/generate.js.map +1 -1
- package/src/lib/generate/types.d.ts +6 -0
- package/src/lib/scaffolds/inputs.d.ts +26 -0
- package/src/lib/scaffolds/inputs.js +36 -0
- package/src/lib/scaffolds/inputs.js.map +1 -0
- package/src/lib/scaffolds/scaffolds.d.ts +3 -0
- package/src/lib/scaffolds/scaffolds.js +6 -30
- package/src/lib/scaffolds/scaffolds.js.map +1 -1
- package/src/recipes/angular-distribution/amendments.d.ts +3 -0
- package/src/recipes/angular-distribution/amendments.js +38 -0
- package/src/recipes/angular-distribution/amendments.js.map +1 -0
- package/src/recipes/angular-distribution/recipe.js +27 -42
- package/src/recipes/angular-distribution/recipe.js.map +1 -1
- package/src/recipes/angular-weaver/amendments.d.ts +3 -0
- package/src/recipes/angular-weaver/amendments.js +34 -0
- package/src/recipes/angular-weaver/amendments.js.map +1 -0
package/README.md
CHANGED
|
@@ -94,9 +94,11 @@ PWA manifest, build/serve/lint/test). `nx serve acme-studio` renders the bare sh
|
|
|
94
94
|
so scaffolding over an existing app can never overwrite the app's own `README.md`.
|
|
95
95
|
|
|
96
96
|
`--styles` decides how the app is styled. The default `tailwind` compiles the shell's source theme,
|
|
97
|
-
which is also what lets you write Tailwind utilities of your own
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
which is also what lets you write Tailwind utilities of your own; the generator writes the
|
|
98
|
+
`.postcssrc.json` that needs, at the workspace root, merging into one that is already there rather
|
|
99
|
+
than replacing it. `precompiled` imports the stylesheet we compiled instead — no `tailwindcss`, no
|
|
100
|
+
style pipeline, no `@source` paths — which is what you want if the product is themed with Bootstrap,
|
|
101
|
+
Bulma or hand-written CSS.
|
|
100
102
|
|
|
101
103
|
## Scaffold backend-integration ports
|
|
102
104
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loomweaver/devkit",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "LoomWeaver scaffolding for Nx workspaces: generators for weavers, distributions, frame plugins and the integration seams, plus the manifest and i18n validators.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"loomweaver",
|
|
@@ -39,6 +39,14 @@ function distributionGenerator(tree, options) {
|
|
|
39
39
|
withTests: distribution.withTests,
|
|
40
40
|
styles: options.styles,
|
|
41
41
|
});
|
|
42
|
+
for (const amendment of (0, generate_1.amendments)(recipe_1.angularDistribution, {
|
|
43
|
+
name: options.name,
|
|
44
|
+
styles: options.styles,
|
|
45
|
+
})) {
|
|
46
|
+
if (amendment.kind === 'postcss') {
|
|
47
|
+
(0, shared_1.addPostcssPlugin)(tree, amendment);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
42
50
|
const scaffold = (0, nx_files_1.nxDistributionFiles)(distribution);
|
|
43
51
|
if (composingIntoExisting) {
|
|
44
52
|
const { 'project.json': ours } = scaffold, rest = tslib_1.__rest(scaffold, ['project.json']);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/generators/distribution/generator.ts"],"names":[],"mappings":";;AAOA,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/generators/distribution/generator.ts"],"names":[],"mappings":";;AAOA,sDAyDC;;AAhED,uCAAqE;AACrE,0DAAmE;AACnE,sCAA4E;AAC5E,sEAAgF;AAChF,yCAAiE;AAGjE,SAAsB,qBAAqB,CACzC,IAAU,EACV,OAAoC;;;QAEpC,MAAM,YAAY,GAAG,IAAA,yBAAc,EAAC;YAClC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,0CAAE,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;YACvD,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,YAAY,EAAE,IAAA,0BAAiB,EAAC,IAAI,CAAC;YACrC,SAAS,EAAE,OAAO,CAAC,cAAc,KAAK,MAAM;SAC7C,CAAC,CAAC;QACH,MAAM,WAAW,GAAG,GAAG,YAAY,CAAC,WAAW,eAAe,CAAC;QAC/D,MAAM,qBAAqB,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACvD,IAAI,qBAAqB,EAAE,CAAC;YAC1B,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;gBACnB,MAAM,IAAI,KAAK,CACb,+BAA+B,YAAY,CAAC,WAAW,gCAAgC;oBACrF,yEAAyE,CAC5E,CAAC;YACJ,CAAC;YACD,MAAM,YAAY,GAAY,IAAA,iBAAQ,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC,IAAI,CA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IAAA,mBAAU,EAAC,IAAI,EAAE,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CAAA;AAQD,SAAS,gBAAgB,CACvB,IAAU,EACV,WAAmB,EACnB,IAAiB;IAEjB,IAAA,mBAAU,EAAC,IAAI,EAAE,WAAW,EAAE,CAAC,QAAqB,EAAE,EAAE;;QAAC,OAAA,+CACpD,QAAQ,GACR,IAAI,KACP,IAAI,EAAE,CAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,MAAM,EAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAA,QAAQ,CAAC,IAAI,mCAAI,EAAE,CAAC,EAC3D,OAAO,kCAAO,QAAQ,CAAC,OAAO,GAAK,IAAI,CAAC,OAAO,KAC/C,CAAA;KAAA,CAAC,CAAC;AACN,CAAC;AAED,kBAAe,qBAAqB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Tree } from '@nx/devkit';
|
|
2
|
+
import { PostcssAmendment } from '../lib/amend/types';
|
|
2
3
|
import { FileMap } from '../lib/generate/types';
|
|
3
4
|
export interface ResolvedApp {
|
|
4
5
|
readonly name: string;
|
|
@@ -14,12 +15,7 @@ export interface ResolvedApp {
|
|
|
14
15
|
* are never candidates — otherwise the standard `<app>` + `<app>-e2e` pair would defeat inference.
|
|
15
16
|
*/
|
|
16
17
|
export declare function resolveApp(tree: Tree, app?: string): ResolvedApp;
|
|
17
|
-
/**
|
|
18
|
-
* The npm scope of the workspace, taken from the root manifest, so a generated import path matches
|
|
19
|
-
* what the consumer already publishes under. Undefined for an unscoped workspace.
|
|
20
|
-
*/
|
|
21
18
|
export declare function workspaceScope(tree: Tree): string | undefined;
|
|
22
|
-
/** The file that carries the workspace path aliases — classic base config or the solution config. */
|
|
23
19
|
export declare function tsconfigPathsFile(tree: Tree): string;
|
|
24
20
|
export declare function writeFiles(tree: Tree, root: string, ...maps: FileMap[]): void;
|
|
25
21
|
export declare function writeFilesGuarded(tree: Tree, root: string, files: FileMap): void;
|
|
@@ -27,11 +23,6 @@ export interface I18nAssetsGlob {
|
|
|
27
23
|
readonly input: string;
|
|
28
24
|
readonly output: string;
|
|
29
25
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Serves a library's i18n bundle through the application's build assets, so the namespace loader
|
|
32
|
-
* can fetch `/i18n/<id>/<lang>.json`. A no-op when the app's build target carries no assets array
|
|
33
|
-
* (a non-standard builder) or the glob is already present.
|
|
34
|
-
*/
|
|
35
26
|
export declare function addI18nAssetsGlob(tree: Tree, app: string, glob: I18nAssetsGlob): void;
|
|
36
27
|
/**
|
|
37
28
|
* Registers a library's sources with the application's Tailwind entry stylesheet, so utilities
|
|
@@ -45,3 +36,4 @@ export declare function addI18nAssetsGlob(tree: Tree, app: string, glob: I18nAss
|
|
|
45
36
|
* stylesheet, or when the source is already listed.
|
|
46
37
|
*/
|
|
47
38
|
export declare function addTailwindSource(tree: Tree, app: string, libSourceRoot: string): void;
|
|
39
|
+
export declare function addPostcssPlugin(tree: Tree, amendment: PostcssAmendment): void;
|
package/src/generators/shared.js
CHANGED
|
@@ -7,8 +7,10 @@ exports.writeFiles = writeFiles;
|
|
|
7
7
|
exports.writeFilesGuarded = writeFilesGuarded;
|
|
8
8
|
exports.addI18nAssetsGlob = addI18nAssetsGlob;
|
|
9
9
|
exports.addTailwindSource = addTailwindSource;
|
|
10
|
+
exports.addPostcssPlugin = addPostcssPlugin;
|
|
10
11
|
const node_path_1 = require("node:path");
|
|
11
12
|
const devkit_1 = require("@nx/devkit");
|
|
13
|
+
const merge_1 = require("../lib/amend/merge");
|
|
12
14
|
/**
|
|
13
15
|
* Resolves the application a scaffold drops into. Named explicitly, or — when the workspace holds
|
|
14
16
|
* exactly one buildable application — inferred from it. Anything else is an error naming the
|
|
@@ -45,10 +47,6 @@ function resolveApp(tree, app) {
|
|
|
45
47
|
.map(([name]) => name)
|
|
46
48
|
.join(', ')}). Pass --app to choose one.`);
|
|
47
49
|
}
|
|
48
|
-
/**
|
|
49
|
-
* The npm scope of the workspace, taken from the root manifest, so a generated import path matches
|
|
50
|
-
* what the consumer already publishes under. Undefined for an unscoped workspace.
|
|
51
|
-
*/
|
|
52
50
|
function workspaceScope(tree) {
|
|
53
51
|
const raw = tree.read('package.json', 'utf-8');
|
|
54
52
|
if (!raw) {
|
|
@@ -60,7 +58,6 @@ function workspaceScope(tree) {
|
|
|
60
58
|
}
|
|
61
59
|
return name.split('/')[0];
|
|
62
60
|
}
|
|
63
|
-
/** The file that carries the workspace path aliases — classic base config or the solution config. */
|
|
64
61
|
function tsconfigPathsFile(tree) {
|
|
65
62
|
return tree.exists('tsconfig.base.json')
|
|
66
63
|
? 'tsconfig.base.json'
|
|
@@ -82,11 +79,6 @@ function writeFilesGuarded(tree, root, files) {
|
|
|
82
79
|
tree.write(full, content);
|
|
83
80
|
}
|
|
84
81
|
}
|
|
85
|
-
/**
|
|
86
|
-
* Serves a library's i18n bundle through the application's build assets, so the namespace loader
|
|
87
|
-
* can fetch `/i18n/<id>/<lang>.json`. A no-op when the app's build target carries no assets array
|
|
88
|
-
* (a non-standard builder) or the glob is already present.
|
|
89
|
-
*/
|
|
90
82
|
function addI18nAssetsGlob(tree, app, glob) {
|
|
91
83
|
var _a, _b, _c;
|
|
92
84
|
const project = (0, devkit_1.readProjectConfiguration)(tree, app);
|
|
@@ -149,4 +141,24 @@ function entryStylesheet(styles) {
|
|
|
149
141
|
}
|
|
150
142
|
return undefined;
|
|
151
143
|
}
|
|
144
|
+
function addPostcssPlugin(tree, amendment) {
|
|
145
|
+
var _a;
|
|
146
|
+
const codeConfigs = [
|
|
147
|
+
'postcss.config.js',
|
|
148
|
+
'postcss.config.mjs',
|
|
149
|
+
'postcss.config.cjs',
|
|
150
|
+
'.postcssrc.js',
|
|
151
|
+
];
|
|
152
|
+
if (codeConfigs.some((name) => tree.exists(name))) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
const existing = tree.exists(amendment.file)
|
|
156
|
+
? JSON.parse((_a = tree.read(amendment.file, 'utf-8')) !== null && _a !== void 0 ? _a : '{}')
|
|
157
|
+
: undefined;
|
|
158
|
+
const result = (0, merge_1.ensurePostcssPlugin)(existing, amendment);
|
|
159
|
+
if (result.added.length === 0) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
tree.write(amendment.file, `${JSON.stringify(result.value, null, 2)}\n`);
|
|
163
|
+
}
|
|
152
164
|
//# sourceMappingURL=shared.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../../../libs/tooling/devkit/src/generators/shared.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../../../libs/tooling/devkit/src/generators/shared.ts"],"names":[],"mappings":";;AAyBA,gCAoCC;AAED,wCAUC;AAED,8CAIC;AAED,gCAMC;AAED,8CAYC;AAOD,8CAqBC;AAaD,8CAsBC;AAoBD,4CAqBC;AA7MD,yCAAkC;AAClC,uCAKoB;AACpB,8CAAyD;AASzD;;;;;;;;GAQG;AACH,SAAgB,UAAU,CAAC,IAAU,EAAE,GAAY;;IACjD,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IACnC,IAAI,GAAG,EAAE,CAAC;QACR,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,sBAAsB,CAAC,CAAC;QAClE,CAAC;QACD,IAAI,OAAO,CAAC,WAAW,KAAK,aAAa,EAAE,CAAC;YAC1C,MAAM,IAAI,KAAK,CACb,IAAI,GAAG,gFAAgF,CACxF,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,CA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,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QAClD,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;QAC1C,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,MAAA,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,mCAAI,IAAI,CAAa;QACrE,CAAC,CAAC,SAAS,CAAC;IACd,MAAM,MAAM,GAAG,IAAA,2BAAmB,EAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACxD,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO;IACT,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3E,CAAC"}
|
package/src/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export type { FileMap, Recipe } from './lib/generate/types';
|
|
2
|
-
export { generate } from './lib/generate/generate';
|
|
2
|
+
export { amendments, generate } from './lib/generate/generate';
|
|
3
|
+
export type { Amendment, AssetGlob, ComposePluginAmendment, BuildTargetAmendment, PostcssAmendment, StylesheetSourceAmendment, } from './lib/amend/types';
|
|
4
|
+
export { ensureBuildTarget, ensurePostcssPlugin, ensureStylesheetSource, joinProjectPath, resolveAssetInput, type MergeResult, } from './lib/amend/merge';
|
|
5
|
+
export { composeLines, composePlugin, type ComposeResult } from './lib/amend/compose';
|
|
6
|
+
export { describeAmendment } from './lib/amend/describe';
|
|
3
7
|
export { isKebabId, toCamelCase, toPascalCase, toTitleCase } from './lib/generate/casing';
|
|
4
8
|
export { angularWeaver, resolveWeaverInput, type WeaverInput, type ResolvedWeaver, } from './recipes/angular-weaver/recipe';
|
|
5
9
|
export { framePlugin, resolveFramePluginInput, type FramePluginInput, type ResolvedFramePlugin, } from './recipes/frame-plugin/recipe';
|
package/src/index.js
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CATALOG_ENTRY_KEYS = exports.validateCatalog = exports.validateI18nParity = exports.KNOWN_CAPABILITIES = exports.validateManifest = exports.usageFor = exports.portableOptions = exports.nxSchemaFor = exports.kebabCase = exports.findScaffold = exports.SCAFFOLDS = exports.resolveLayoutInput = exports.layout = exports.resolveThemeInput = exports.theme = exports.resolveSettingsStoreInput = exports.settingsStore = exports.resolveAuthSourceInput = exports.authSource = exports.resolveDistributionInput = exports.angularDistribution = exports.resolveFramePluginInput = exports.framePlugin = exports.resolveWeaverInput = exports.angularWeaver = exports.toTitleCase = exports.toPascalCase = exports.toCamelCase = exports.isKebabId = exports.generate = void 0;
|
|
3
|
+
exports.CATALOG_ENTRY_KEYS = exports.validateCatalog = exports.validateI18nParity = exports.KNOWN_CAPABILITIES = exports.validateManifest = exports.usageFor = exports.portableOptions = exports.nxSchemaFor = exports.kebabCase = exports.findScaffold = exports.SCAFFOLDS = exports.resolveLayoutInput = exports.layout = exports.resolveThemeInput = exports.theme = exports.resolveSettingsStoreInput = exports.settingsStore = exports.resolveAuthSourceInput = exports.authSource = exports.resolveDistributionInput = exports.angularDistribution = exports.resolveFramePluginInput = exports.framePlugin = exports.resolveWeaverInput = exports.angularWeaver = exports.toTitleCase = exports.toPascalCase = exports.toCamelCase = exports.isKebabId = exports.describeAmendment = exports.composePlugin = exports.composeLines = exports.resolveAssetInput = exports.joinProjectPath = exports.ensureStylesheetSource = exports.ensurePostcssPlugin = exports.ensureBuildTarget = exports.generate = exports.amendments = void 0;
|
|
4
4
|
var generate_1 = require("./lib/generate/generate");
|
|
5
|
+
Object.defineProperty(exports, "amendments", { enumerable: true, get: function () { return generate_1.amendments; } });
|
|
5
6
|
Object.defineProperty(exports, "generate", { enumerable: true, get: function () { return generate_1.generate; } });
|
|
7
|
+
var merge_1 = require("./lib/amend/merge");
|
|
8
|
+
Object.defineProperty(exports, "ensureBuildTarget", { enumerable: true, get: function () { return merge_1.ensureBuildTarget; } });
|
|
9
|
+
Object.defineProperty(exports, "ensurePostcssPlugin", { enumerable: true, get: function () { return merge_1.ensurePostcssPlugin; } });
|
|
10
|
+
Object.defineProperty(exports, "ensureStylesheetSource", { enumerable: true, get: function () { return merge_1.ensureStylesheetSource; } });
|
|
11
|
+
Object.defineProperty(exports, "joinProjectPath", { enumerable: true, get: function () { return merge_1.joinProjectPath; } });
|
|
12
|
+
Object.defineProperty(exports, "resolveAssetInput", { enumerable: true, get: function () { return merge_1.resolveAssetInput; } });
|
|
13
|
+
var compose_1 = require("./lib/amend/compose");
|
|
14
|
+
Object.defineProperty(exports, "composeLines", { enumerable: true, get: function () { return compose_1.composeLines; } });
|
|
15
|
+
Object.defineProperty(exports, "composePlugin", { enumerable: true, get: function () { return compose_1.composePlugin; } });
|
|
16
|
+
var describe_1 = require("./lib/amend/describe");
|
|
17
|
+
Object.defineProperty(exports, "describeAmendment", { enumerable: true, get: function () { return describe_1.describeAmendment; } });
|
|
6
18
|
var casing_1 = require("./lib/generate/casing");
|
|
7
19
|
Object.defineProperty(exports, "isKebabId", { enumerable: true, get: function () { return casing_1.isKebabId; } });
|
|
8
20
|
Object.defineProperty(exports, "toCamelCase", { enumerable: true, get: function () { return casing_1.toCamelCase; } });
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/tooling/devkit/src/index.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/tooling/devkit/src/index.ts"],"names":[],"mappings":";;;AACA,oDAA+D;AAAtD,sGAAA,UAAU,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAS7B,2CAO2B;AANzB,0GAAA,i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ginAmendment } from './types';
|
|
2
|
+
export interface ComposeResult {
|
|
3
|
+
readonly source: string;
|
|
4
|
+
readonly composed: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Registers a generated plugin in a composition root we generated ourselves. Recognition is the
|
|
8
|
+
* whole safety mechanism: the providers array and the shell import are matched by the shape the
|
|
9
|
+
* scaffold writes, and anything else is declined rather than guessed at.
|
|
10
|
+
*/
|
|
11
|
+
export declare function composePlugin(source: string, amendment: ComposePluginAmendment, importPath: string): ComposeResult;
|
|
12
|
+
export declare function composeLines(amendment: ComposePluginAmendment, importPath: string): readonly string[];
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.composePlugin = composePlugin;
|
|
4
|
+
exports.composeLines = composeLines;
|
|
5
|
+
const PROVIDERS = /(export\s+const\s+appConfig\s*:[^=]*=\s*\{[\s\S]*?providers\s*:\s*\[)([\s\S]*?)(\n(\s*)\],)/;
|
|
6
|
+
const SHELL_IMPORT = /import\s*\{([^}]*)\}\s*from\s*'@loomweaver\/shell';/;
|
|
7
|
+
/**
|
|
8
|
+
* Registers a generated plugin in a composition root we generated ourselves. Recognition is the
|
|
9
|
+
* whole safety mechanism: the providers array and the shell import are matched by the shape the
|
|
10
|
+
* scaffold writes, and anything else is declined rather than guessed at.
|
|
11
|
+
*/
|
|
12
|
+
function composePlugin(source, amendment, importPath) {
|
|
13
|
+
if (source.includes(amendment.symbol)) {
|
|
14
|
+
return { source, composed: true };
|
|
15
|
+
}
|
|
16
|
+
const providers = PROVIDERS.exec(source);
|
|
17
|
+
const shellImport = SHELL_IMPORT.exec(source);
|
|
18
|
+
if (!providers || !shellImport) {
|
|
19
|
+
return { source, composed: false };
|
|
20
|
+
}
|
|
21
|
+
const withImports = source.replace(SHELL_IMPORT, `import {${withShellSymbols(shellImport[1])}} from '@loomweaver/shell';\nimport { ${amendment.symbol} } from '${importPath}';`);
|
|
22
|
+
const indent = `${providers[4]} `;
|
|
23
|
+
const lines = [
|
|
24
|
+
`${indent}provideTranslationNamespaces('${amendment.id}'),`,
|
|
25
|
+
`${indent}provideCapabilityGrants({ ${amendment.id}: [${amendment.capabilities
|
|
26
|
+
.map((capability) => `'${capability}'`)
|
|
27
|
+
.join(', ')}] }),`,
|
|
28
|
+
`${indent}...providePlugins(${amendment.symbol}),`,
|
|
29
|
+
].join('\n');
|
|
30
|
+
return {
|
|
31
|
+
source: withImports.replace(PROVIDERS, (_all, head, body, tail) => `${head}${body}\n${lines}${tail}`),
|
|
32
|
+
composed: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function composeLines(amendment, importPath) {
|
|
36
|
+
return [
|
|
37
|
+
`import { ${amendment.symbol} } from '${importPath}';`,
|
|
38
|
+
"import { providePlugins, provideCapabilityGrants, provideTranslationNamespaces } from '@loomweaver/shell';",
|
|
39
|
+
`provideTranslationNamespaces('${amendment.id}'),`,
|
|
40
|
+
`provideCapabilityGrants({ ${amendment.id}: [${amendment.capabilities
|
|
41
|
+
.map((capability) => `'${capability}'`)
|
|
42
|
+
.join(', ')}] }),`,
|
|
43
|
+
`...providePlugins(${amendment.symbol}),`,
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
function withShellSymbols(existing) {
|
|
47
|
+
const wanted = [
|
|
48
|
+
'provideCapabilityGrants',
|
|
49
|
+
'providePlugins',
|
|
50
|
+
'provideTranslationNamespaces',
|
|
51
|
+
];
|
|
52
|
+
const present = existing
|
|
53
|
+
.split(',')
|
|
54
|
+
.map((symbol) => symbol.trim())
|
|
55
|
+
.filter(Boolean);
|
|
56
|
+
const missing = wanted.filter((symbol) => !present.some((entry) => entry.replace(/^type\s+/, '') === symbol));
|
|
57
|
+
if (missing.length === 0) {
|
|
58
|
+
return existing;
|
|
59
|
+
}
|
|
60
|
+
const multiline = existing.includes('\n');
|
|
61
|
+
const all = [...present, ...missing].sort((a, b) => a.localeCompare(b));
|
|
62
|
+
return multiline ? `\n ${all.join(',\n ')},\n` : ` ${all.join(', ')} `;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=compose.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compose.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/lib/amend/compose.ts"],"names":[],"mappings":";;AAeA,sCAiCC;AAED,oCAaC;AAxDD,MAAM,SAAS,GAAG,6FAA6F,CAAC;AAChH,MAAM,YAAY,GAAG,qDAAqD,CAAC;AAE3E;;;;GAIG;AACH,SAAgB,aAAa,CAC3B,MAAc,EACd,SAAiC,EACjC,UAAkB;IAElB,IAAI,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACpC,CAAC;IACD,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzC,MAAM,WAAW,GAAG,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9C,IAAI,CAAC,SAAS,IAAI,CAAC,WAAW,EAAE,CAAC;QAC/B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACrC,CAAC;IACD,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAChC,YAAY,EACZ,WAAW,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,yCAAyC,SAAS,CAAC,MAAM,YAAY,UAAU,IAAI,CAC/H,CAAC;IACF,MAAM,MAAM,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;IACnC,MAAM,KAAK,GAAG;QACZ,GAAG,MAAM,iCAAiC,SAAS,CAAC,EAAE,KAAK;QAC3D,GAAG,MAAM,6BAA6B,SAAS,CAAC,EAAE,MAAM,SAAS,CAAC,YAAY;aAC3E,GAAG,CAAC,CAAC,UAAU,EAA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O,CAAC,UAAU,EAAE,EAAE,CAAC,KAAK,MAAM,CAAC,CAC/E,CAAC;IACF,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,MAAM,SAAS,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC1C,MAAM,GAAG,GAAG,CAAC,GAAG,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IACxE,OAAO,SAAS,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Amendment } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* States an amendment as a step a reader can carry out, with what it costs to skip. A route that
|
|
4
|
+
* cannot reach the workspace returns these instead of performing them, so that generated output is
|
|
5
|
+
* never silently incomplete.
|
|
6
|
+
*/
|
|
7
|
+
export declare function describeAmendment(amendment: Amendment): string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.describeAmendment = describeAmendment;
|
|
4
|
+
/**
|
|
5
|
+
* States an amendment as a step a reader can carry out, with what it costs to skip. A route that
|
|
6
|
+
* cannot reach the workspace returns these instead of performing them, so that generated output is
|
|
7
|
+
* never silently incomplete.
|
|
8
|
+
*/
|
|
9
|
+
function describeAmendment(amendment) {
|
|
10
|
+
if (amendment.kind === 'postcss') {
|
|
11
|
+
return `Write ${amendment.file} beside your package.json, naming ${amendment.plugin}. Without it the stylesheet is read as plain CSS: no utility class is emitted, the workbench renders unstyled, and the build still reports success.`;
|
|
12
|
+
}
|
|
13
|
+
if (amendment.kind === 'stylesheet-source') {
|
|
14
|
+
return `Add an @source entry for '${amendment.sourceRoot}' to the application's entry stylesheet, resolved from that stylesheet. Without it none of that code's utilities are emitted.`;
|
|
15
|
+
}
|
|
16
|
+
if (amendment.kind === 'compose-plugin') {
|
|
17
|
+
return `Register ${amendment.id} in the composition root: import { ${amendment.symbol} }, provideTranslationNamespaces('${amendment.id}'), provideCapabilityGrants({ ${amendment.id}: [${amendment.capabilities
|
|
18
|
+
.map((capability) => `'${capability}'`)
|
|
19
|
+
.join(', ')}] }) and ...providePlugins(${amendment.symbol}). Without it none of its contributions appear.`;
|
|
20
|
+
}
|
|
21
|
+
return [
|
|
22
|
+
...(amendment.styles.length > 0
|
|
23
|
+
? [`name ${amendment.styles.join(', ')} in styles`]
|
|
24
|
+
: []),
|
|
25
|
+
...(amendment.assets.length > 0
|
|
26
|
+
? [
|
|
27
|
+
`add assets for ${amendment.assets
|
|
28
|
+
.map((asset) => asset.input)
|
|
29
|
+
.join(', ')} (the shell fetches its own strings at runtime, so without that glob every label in the chrome renders as its raw translation key)`,
|
|
30
|
+
]
|
|
31
|
+
: []),
|
|
32
|
+
...(amendment.serviceWorker
|
|
33
|
+
? [
|
|
34
|
+
`set serviceWorker to ${amendment.serviceWorker} in the production configuration (provideShell registers a worker that 404s otherwise)`,
|
|
35
|
+
]
|
|
36
|
+
: []),
|
|
37
|
+
...(amendment.inlineCritical === undefined
|
|
38
|
+
? []
|
|
39
|
+
: [
|
|
40
|
+
`set optimization.styles.inlineCritical to ${amendment.inlineCritical} in the production configuration (the generated content-security policy blocks the inline handler Angular's critical-CSS pass attaches, so a release build renders unstyled)`,
|
|
41
|
+
]),
|
|
42
|
+
]
|
|
43
|
+
.map((step, index) => `${index + 1}. ${step}`)
|
|
44
|
+
.join(' ');
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=describe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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ACP,GAAG,CAAC,SAAS,CAAC,aAAa;YACzB,CAAC,CAAC;gBACE,wBAAwB,SAAS,CAAC,aAAa,wFAAwF;aACxI;YACH,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,SAAS,CAAC,cAAc,KAAK,SAAS;YACxC,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC;gBACE,6CAA6C,SAAS,CAAC,cAAc,8KAA8K;aACpP,CAAC;KACP;SACE,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;SAC7C,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AssetGlob, BuildTargetAmendment, PostcssAmendment } from './types';
|
|
2
|
+
export type JsonObject = Record<string, unknown>;
|
|
3
|
+
export interface MergeResult {
|
|
4
|
+
readonly value: JsonObject;
|
|
5
|
+
/** What was added, named for the run's own report. Empty when everything was already there. */
|
|
6
|
+
readonly added: readonly string[];
|
|
7
|
+
/** What could not be added because the consumer's value occupies the place it would go. */
|
|
8
|
+
readonly declined: readonly string[];
|
|
9
|
+
}
|
|
10
|
+
export declare function joinProjectPath(projectRoot: string, path: string): string;
|
|
11
|
+
export declare function resolveAssetInput(glob: AssetGlob, projectRoot: string): string;
|
|
12
|
+
export declare function ensurePostcssPlugin(existing: unknown, amendment: PostcssAmendment): MergeResult;
|
|
13
|
+
export declare function ensureBuildTarget(target: unknown, amendment: BuildTargetAmendment, projectRoot: string): MergeResult;
|
|
14
|
+
export declare function ensureStylesheetSource(css: string, source: string): string;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.joinProjectPath = joinProjectPath;
|
|
4
|
+
exports.resolveAssetInput = resolveAssetInput;
|
|
5
|
+
exports.ensurePostcssPlugin = ensurePostcssPlugin;
|
|
6
|
+
exports.ensureBuildTarget = ensureBuildTarget;
|
|
7
|
+
exports.ensureStylesheetSource = ensureStylesheetSource;
|
|
8
|
+
function joinProjectPath(projectRoot, path) {
|
|
9
|
+
const root = projectRoot.replace(/^\.?\/*/, '').replace(/\/+$/, '');
|
|
10
|
+
return root ? `${root}/${path}` : path;
|
|
11
|
+
}
|
|
12
|
+
function resolveAssetInput(glob, projectRoot) {
|
|
13
|
+
return glob.from === 'project'
|
|
14
|
+
? joinProjectPath(projectRoot, glob.input)
|
|
15
|
+
: glob.input;
|
|
16
|
+
}
|
|
17
|
+
function ensurePostcssPlugin(existing, amendment) {
|
|
18
|
+
var _a;
|
|
19
|
+
const root = (_a = asObject(existing)) !== null && _a !== void 0 ? _a : {};
|
|
20
|
+
const plugins = asObject(root['plugins']);
|
|
21
|
+
if (plugins === undefined && root['plugins'] !== undefined) {
|
|
22
|
+
return {
|
|
23
|
+
value: root,
|
|
24
|
+
added: [],
|
|
25
|
+
declined: [`${amendment.file}: "plugins" is not an object`],
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const next = Object.assign({}, (plugins !== null && plugins !== void 0 ? plugins : {}));
|
|
29
|
+
if (amendment.plugin in next) {
|
|
30
|
+
return { value: root, added: [], declined: [] };
|
|
31
|
+
}
|
|
32
|
+
next[amendment.plugin] = {};
|
|
33
|
+
return {
|
|
34
|
+
value: Object.assign(Object.assign({}, root), { plugins: next }),
|
|
35
|
+
added: [`${amendment.file}: ${amendment.plugin}`],
|
|
36
|
+
declined: [],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function ensureBuildTarget(target, amendment, projectRoot) {
|
|
40
|
+
var _a, _b, _c, _d;
|
|
41
|
+
const next = Object.assign({}, ((_a = asObject(target)) !== null && _a !== void 0 ? _a : {}));
|
|
42
|
+
const added = [];
|
|
43
|
+
const declined = [];
|
|
44
|
+
const options = Object.assign({}, ((_b = asObject(next['options'])) !== null && _b !== void 0 ? _b : {}));
|
|
45
|
+
const styles = ensureStrings(options['styles'], amendment.styles.map((style) => joinProjectPath(projectRoot, style)));
|
|
46
|
+
if (styles.added.length > 0) {
|
|
47
|
+
options['styles'] = styles.value;
|
|
48
|
+
added.push(...styles.added.map((entry) => `styles: ${entry}`));
|
|
49
|
+
}
|
|
50
|
+
const assets = ensureAssets(options['assets'], amendment.assets, projectRoot);
|
|
51
|
+
if (assets.added.length > 0) {
|
|
52
|
+
options['assets'] = assets.value;
|
|
53
|
+
added.push(...assets.added.map((entry) => `assets: ${entry}`));
|
|
54
|
+
}
|
|
55
|
+
next['options'] = options;
|
|
56
|
+
if (amendment.inlineCritical !== undefined || amendment.serviceWorker) {
|
|
57
|
+
const configurations = Object.assign({}, ((_c = asObject(next['configurations'])) !== null && _c !== void 0 ? _c : {}));
|
|
58
|
+
const production = Object.assign({}, ((_d = asObject(configurations['production'])) !== null && _d !== void 0 ? _d : {}));
|
|
59
|
+
if (amendment.serviceWorker && production['serviceWorker'] === undefined) {
|
|
60
|
+
production['serviceWorker'] = joinProjectPath(projectRoot, amendment.serviceWorker);
|
|
61
|
+
added.push(`production serviceWorker: ${production['serviceWorker']}`);
|
|
62
|
+
}
|
|
63
|
+
if (amendment.inlineCritical !== undefined) {
|
|
64
|
+
const critical = ensureInlineCritical(production['optimization'], amendment.inlineCritical);
|
|
65
|
+
if (critical.declined) {
|
|
66
|
+
declined.push('production optimization is a boolean, so inlineCritical cannot be set beside it — ' +
|
|
67
|
+
'a release build then loads the stylesheet with an inline handler the generated ' +
|
|
68
|
+
'content-security policy blocks, and renders unstyled');
|
|
69
|
+
}
|
|
70
|
+
else if (critical.changed) {
|
|
71
|
+
production['optimization'] = critical.value;
|
|
72
|
+
added.push(`production optimization.styles.inlineCritical: ${amendment.inlineCritical}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
configurations['production'] = production;
|
|
76
|
+
next['configurations'] = configurations;
|
|
77
|
+
}
|
|
78
|
+
return { value: next, added, declined };
|
|
79
|
+
}
|
|
80
|
+
function ensureStylesheetSource(css, source) {
|
|
81
|
+
const quoted = source.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
82
|
+
if (new RegExp(`@source\\s+['"]${quoted}/?['"]`).test(css)) {
|
|
83
|
+
return css;
|
|
84
|
+
}
|
|
85
|
+
return `${css.trimEnd()}\n\n@source '${source}';\n`;
|
|
86
|
+
}
|
|
87
|
+
function ensureInlineCritical(optimization, inlineCritical) {
|
|
88
|
+
var _a;
|
|
89
|
+
if (typeof optimization === 'boolean') {
|
|
90
|
+
return { value: optimization, changed: false, declined: true };
|
|
91
|
+
}
|
|
92
|
+
const root = Object.assign({}, ((_a = asObject(optimization)) !== null && _a !== void 0 ? _a : {}));
|
|
93
|
+
const styles = asObject(root['styles']);
|
|
94
|
+
if (styles === undefined && root['styles'] !== undefined) {
|
|
95
|
+
return { value: optimization, changed: false, declined: true };
|
|
96
|
+
}
|
|
97
|
+
if ((styles === null || styles === void 0 ? void 0 : styles['inlineCritical']) !== undefined) {
|
|
98
|
+
return { value: optimization, changed: false, declined: false };
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
value: Object.assign(Object.assign({}, root), { styles: Object.assign(Object.assign({}, (styles !== null && styles !== void 0 ? styles : {})), { inlineCritical }) }),
|
|
102
|
+
changed: true,
|
|
103
|
+
declined: false,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function ensureStrings(existing, wanted) {
|
|
107
|
+
const list = Array.isArray(existing) ? [...existing] : [];
|
|
108
|
+
const added = [];
|
|
109
|
+
for (const entry of wanted) {
|
|
110
|
+
if (!list.includes(entry)) {
|
|
111
|
+
list.push(entry);
|
|
112
|
+
added.push(entry);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return { value: list, added };
|
|
116
|
+
}
|
|
117
|
+
function ensureAssets(existing, wanted, projectRoot) {
|
|
118
|
+
const list = Array.isArray(existing) ? [...existing] : [];
|
|
119
|
+
const added = [];
|
|
120
|
+
for (const glob of wanted) {
|
|
121
|
+
const input = resolveAssetInput(glob, projectRoot);
|
|
122
|
+
if (list.some((entry) => inputOf(entry) === input)) {
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
list.push(Object.assign({ glob: glob.glob, input }, (glob.output === undefined ? {} : { output: glob.output })));
|
|
126
|
+
added.push(input);
|
|
127
|
+
}
|
|
128
|
+
return { value: list, added };
|
|
129
|
+
}
|
|
130
|
+
function inputOf(entry) {
|
|
131
|
+
if (typeof entry === 'string') {
|
|
132
|
+
return entry;
|
|
133
|
+
}
|
|
134
|
+
const asset = asObject(entry);
|
|
135
|
+
return typeof (asset === null || asset === void 0 ? void 0 : asset['input']) === 'string' ? asset['input'] : undefined;
|
|
136
|
+
}
|
|
137
|
+
function asObject(value) {
|
|
138
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value)
|
|
139
|
+
? value
|
|
140
|
+
: undefined;
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=merge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/lib/amend/merge.ts"],"names":[],"mappings":";;AAYA,0CAGC;AAED,8CAIC;AAED,kDAuBC;AAED,8CA8DC;AAED,wDAMC;AA1GD,SAAgB,eAAe,CAAC,WAAmB,EAAE,IAAY;IAC/D,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACpE,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACzC,CAAC;AAED,SAAgB,iBAAiB,CAAC,IAAe,EAAE,WAAmB;IACpE,OAAO,IAAI,CAAC,IAAI,KAAK,SAAS;QAC5B,CAAC,CAAC,eAAe,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC;QAC1C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,EAAE,KAAK,EAAE,CAAC;AAChC,CAAC;AAED,SAAS,OAAO,CAAC,KAAc;IAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9B,OAAO,OAAO,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,OAAO,CAAC,CAAA,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3E,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACzE,CAAC,CAAE,KAAoB;QACvB,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What generated output needs from the workspace around it, stated as data so that every route can
|
|
3
|
+
* apply it with whatever it has: a filesystem, an Nx tree, or nothing but words.
|
|
4
|
+
*
|
|
5
|
+
* Every amendment is an "ensure this is present", never a "set this to". Applying one twice changes
|
|
6
|
+
* nothing, and a value the consumer already chose always wins.
|
|
7
|
+
*/
|
|
8
|
+
export type Amendment = PostcssAmendment | BuildTargetAmendment | StylesheetSourceAmendment | ComposePluginAmendment;
|
|
9
|
+
/**
|
|
10
|
+
* An entry in a build target's `assets` array. Where the input is resolved from differs per entry
|
|
11
|
+
* and cannot be guessed: the project's own folder is named relative to the project, an installed
|
|
12
|
+
* package relative to the workspace.
|
|
13
|
+
*/
|
|
14
|
+
export interface AssetGlob {
|
|
15
|
+
readonly glob: string;
|
|
16
|
+
readonly input: string;
|
|
17
|
+
readonly from: 'project' | 'workspace';
|
|
18
|
+
readonly output?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The style pipeline the generated stylesheet needs. Without it the stylesheet is read as plain CSS,
|
|
22
|
+
* which emits no utility class at all and leaves the workbench unstyled without failing the build.
|
|
23
|
+
*/
|
|
24
|
+
export interface PostcssAmendment {
|
|
25
|
+
readonly kind: 'postcss';
|
|
26
|
+
/** Resolved against the workspace root, not the generated project. */
|
|
27
|
+
readonly file: '.postcssrc.json';
|
|
28
|
+
readonly plugin: string;
|
|
29
|
+
}
|
|
30
|
+
/** What the application's build target needs so the generated product runs as it was built. */
|
|
31
|
+
export interface BuildTargetAmendment {
|
|
32
|
+
readonly kind: 'build-target';
|
|
33
|
+
/** Project-relative, because a build target names its stylesheet the way its workspace does. */
|
|
34
|
+
readonly styles: readonly string[];
|
|
35
|
+
readonly assets: readonly AssetGlob[];
|
|
36
|
+
readonly serviceWorker?: string;
|
|
37
|
+
/**
|
|
38
|
+
* False here is not a preference. The generated document ships a strict `script-src 'self'`, and
|
|
39
|
+
* the critical-CSS pass loads the stylesheet with an inline `onload` that the policy blocks, so a
|
|
40
|
+
* release build renders completely unstyled while reporting success.
|
|
41
|
+
*/
|
|
42
|
+
readonly inlineCritical?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** A source directory the entry stylesheet must name, or its utilities are never emitted. */
|
|
45
|
+
export interface StylesheetSourceAmendment {
|
|
46
|
+
readonly kind: 'stylesheet-source';
|
|
47
|
+
/**
|
|
48
|
+
* Workspace-relative, because only the route applying this knows where the entry stylesheet sits,
|
|
49
|
+
* and `@source` is resolved from that stylesheet rather than from the workspace root.
|
|
50
|
+
*/
|
|
51
|
+
readonly sourceRoot: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A generated plugin the distribution must register, or none of its contributions ever appear. The
|
|
55
|
+
* receiving file is generated too, which is the only reason composing into it is safe: where it no
|
|
56
|
+
* longer presents that shape, the route names these lines instead of guessing at the consumer's code.
|
|
57
|
+
*/
|
|
58
|
+
export interface ComposePluginAmendment {
|
|
59
|
+
readonly kind: 'compose-plugin';
|
|
60
|
+
readonly id: string;
|
|
61
|
+
/** The symbol the plugin's own entry point exports. */
|
|
62
|
+
readonly symbol: string;
|
|
63
|
+
/** Exactly what the plugin's manifest declares; the broker is default-deny. */
|
|
64
|
+
readonly capabilities: readonly string[];
|
|
65
|
+
/** Workspace-relative, because only the applying route knows where the composition root sits. */
|
|
66
|
+
readonly sourceRoot: string;
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/lib/amend/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
import { Amendment } from '../amend/types';
|
|
1
2
|
import { FileMap, Recipe } from './types';
|
|
2
3
|
export declare function generate<Input>(recipe: Recipe<Input>, input: Input): FileMap;
|
|
4
|
+
export declare function amendments<Input>(recipe: Recipe<Input>, input: Input): readonly Amendment[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generate = generate;
|
|
4
|
+
exports.amendments = amendments;
|
|
4
5
|
function isUnsafePath(path) {
|
|
5
6
|
return (path.length === 0 ||
|
|
6
7
|
path.startsWith('/') ||
|
|
@@ -15,4 +16,8 @@ function generate(recipe, input) {
|
|
|
15
16
|
}
|
|
16
17
|
return files;
|
|
17
18
|
}
|
|
19
|
+
function amendments(recipe, input) {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
return (_b = (_a = recipe.amend) === null || _a === void 0 ? void 0 : _a.call(recipe, input)) !== null && _b !== void 0 ? _b : [];
|
|
22
|
+
}
|
|
18
23
|
//# sourceMappingURL=generate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/lib/generate/generate.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/lib/generate/generate.ts"],"names":[],"mappings":";;AAYA,4BAOC;AAED,gCAKC;AAvBD,SAAS,YAAY,CAAC,IAAY;IAChC,OAAO,CACL,IAAI,CAAC,MAAM,KAAK,CAAC;QACjB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QACpB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QACnB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAC/B,CAAC;AACJ,CAAC;AAED,SAAgB,QAAQ,CAAQ,MAAqB,EAAE,KAAY;IACjE,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACrD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,WAAW,MAAM,CAAC,EAAE,+BAA+B,MAAM,IAAI,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,UAAU,CACxB,MAAqB,EACrB,KAAY;;IAEZ,OAAO,MAAA,MAAA,MAAM,CAAC,KAAK,uDAAG,KAAK,CAAC,mCAAI,EAAE,CAAC;AACrC,CAAC"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import { Amendment } from '../amend/types';
|
|
1
2
|
export type FileMap = Readonly<Record<string, string>>;
|
|
2
3
|
export interface Recipe<Input> {
|
|
3
4
|
readonly id: string;
|
|
4
5
|
build(input: Input): FileMap;
|
|
6
|
+
/**
|
|
7
|
+
* What the workspace around the generated files must carry for them to work. A recipe that needs
|
|
8
|
+
* nothing omits this, and every route then behaves exactly as it did before amendments existed.
|
|
9
|
+
*/
|
|
10
|
+
amend?(input: Input): readonly Amendment[];
|
|
5
11
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DistributionStyles } from '../../recipes/angular-distribution/recipe';
|
|
2
|
+
import { ScaffoldValues } from './scaffolds';
|
|
3
|
+
export declare function weaverInput(values: ScaffoldValues): {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string | undefined;
|
|
6
|
+
prefix: string | undefined;
|
|
7
|
+
importPath: string | undefined;
|
|
8
|
+
features: {
|
|
9
|
+
command: boolean | undefined;
|
|
10
|
+
shortcut: string | undefined;
|
|
11
|
+
menu: string | undefined;
|
|
12
|
+
barItem: boolean | undefined;
|
|
13
|
+
settings: boolean | undefined;
|
|
14
|
+
about: boolean | undefined;
|
|
15
|
+
instanceable: boolean | undefined;
|
|
16
|
+
container: boolean | undefined;
|
|
17
|
+
access: string | undefined;
|
|
18
|
+
spec: boolean | undefined;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare function distributionInput(values: ScaffoldValues): {
|
|
22
|
+
name: string;
|
|
23
|
+
title: string | undefined;
|
|
24
|
+
directory: string | undefined;
|
|
25
|
+
styles: DistributionStyles;
|
|
26
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.weaverInput = weaverInput;
|
|
4
|
+
exports.distributionInput = distributionInput;
|
|
5
|
+
const scaffolds_1 = require("./scaffolds");
|
|
6
|
+
function weaverInput(values) {
|
|
7
|
+
var _a;
|
|
8
|
+
return {
|
|
9
|
+
id: (_a = (0, scaffolds_1.str)(values, 'id')) !== null && _a !== void 0 ? _a : '',
|
|
10
|
+
name: (0, scaffolds_1.str)(values, 'name'),
|
|
11
|
+
prefix: (0, scaffolds_1.str)(values, 'prefix'),
|
|
12
|
+
importPath: (0, scaffolds_1.str)(values, 'importPath'),
|
|
13
|
+
features: {
|
|
14
|
+
command: (0, scaffolds_1.bool)(values, 'command'),
|
|
15
|
+
shortcut: (0, scaffolds_1.str)(values, 'shortcut'),
|
|
16
|
+
menu: (0, scaffolds_1.str)(values, 'menu'),
|
|
17
|
+
barItem: (0, scaffolds_1.bool)(values, 'barItem'),
|
|
18
|
+
settings: (0, scaffolds_1.bool)(values, 'settings'),
|
|
19
|
+
about: (0, scaffolds_1.bool)(values, 'about'),
|
|
20
|
+
instanceable: (0, scaffolds_1.bool)(values, 'instanceable'),
|
|
21
|
+
container: (0, scaffolds_1.bool)(values, 'container'),
|
|
22
|
+
access: (0, scaffolds_1.str)(values, 'access'),
|
|
23
|
+
spec: (0, scaffolds_1.bool)(values, 'spec'),
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function distributionInput(values) {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
return {
|
|
30
|
+
name: (_a = (0, scaffolds_1.str)(values, 'name')) !== null && _a !== void 0 ? _a : '',
|
|
31
|
+
title: (0, scaffolds_1.str)(values, 'title'),
|
|
32
|
+
directory: (0, scaffolds_1.str)(values, 'directory'),
|
|
33
|
+
styles: (_b = (0, scaffolds_1.str)(values, 'styles')) !== null && _b !== void 0 ? _b : 'tailwind',
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=inputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputs.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/lib/scaffolds/inputs.ts"],"names":[],"mappings":";;AAGA,kCAmBC;AAED,8CAQC;AA/BD,2CAAwD;AAExD,SAAgB,WAAW,CAAC,MAAsB;;IAChD,OAAO;QACL,EAAE,EAAE,MAAA,IAAA,eAAG,EAAC,MAAM,EAAE,IAAI,CAAC,mCAAI,EAAE;QAC3B,IAAI,EAAE,IAAA,eAAG,EAAC,MAAM,EAAE,MAAM,CAAC;QACzB,MAAM,EAAE,IAAA,eAAG,EAAC,MAAM,EAAE,QAAQ,CAAC;QAC7B,UAAU,EAAE,IAAA,eAAG,EAAC,MAAM,EAAE,YAAY,CAAC;QACrC,QAAQ,EAAE;YACR,OAAO,EAAE,IAAA,gBAAI,EAAC,MAAM,EAAE,SAAS,CAAC;YAChC,QAAQ,EAAE,IAAA,eAAG,EAAC,MAAM,EAAE,UAAU,CAAC;YACjC,IAAI,EAAE,IAAA,eAAG,EAAC,MAAM,EAAE,MAAM,CAAC;YACzB,OAAO,EAAE,IAAA,gBAAI,EAAC,MAAM,EAAE,SAAS,CAAC;YAChC,QAAQ,EAAE,IAAA,gBAAI,EAAC,MAAM,EAAE,UAAU,CAAC;YAClC,KAAK,EAAE,IAAA,gBAAI,EAAC,MAAM,EAAE,OAAO,CAAC;YAC5B,YAAY,EAAE,IAAA,gBAAI,EAAC,MAAM,EAAE,cAAc,CAAC;YAC1C,SAAS,EAAE,IAAA,gBAAI,EAAC,MAAM,EAAE,WAAW,CAAC;YACpC,MAAM,EAAE,IAAA,eAAG,EAAC,MAAM,EAAE,QAAQ,CAAC;YAC7B,IAAI,EAAE,IAAA,gBAAI,EAAC,MAAM,EAAE,MAAM,CAAC;SAC3B;KACF,CAAC;AACJ,CAAC;AAED,SAAgB,iBAAiB,CAAC,MAAsB;;IACtD,OAAO;QACL,IAAI,EAAE,MAAA,IAAA,eAAG,EAAC,MAAM,EAAE,MAAM,CAAC,mCAAI,EAAE;QAC/B,KAAK,EAAE,IAAA,eAAG,EAAC,MAAM,EAAE,OAAO,CAAC;QAC3B,SAAS,EAAE,IAAA,eAAG,EAAC,MAAM,EAAE,WAAW,CAAC;QACnC,MAAM,EACJ,MAAC,IAAA,eAAG,EAAC,MAAM,EAAE,QAAQ,CAAoC,mCAAI,UAAU;KAC1E,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Amendment } from '../amend/types';
|
|
1
2
|
import { FileMap } from '../generate/types';
|
|
2
3
|
export type ScaffoldValues = Readonly<Record<string, string | boolean | undefined>>;
|
|
3
4
|
export interface ScaffoldOption {
|
|
@@ -19,6 +20,8 @@ export interface ScaffoldDescriptor {
|
|
|
19
20
|
readonly summary: string;
|
|
20
21
|
readonly options: readonly ScaffoldOption[];
|
|
21
22
|
build(values: ScaffoldValues): FileMap;
|
|
23
|
+
/** What the workspace around the generated files must carry. Absent where nothing is needed. */
|
|
24
|
+
amend?(values: ScaffoldValues): readonly Amendment[];
|
|
22
25
|
}
|
|
23
26
|
export declare function str(values: ScaffoldValues, name: string): string | undefined;
|
|
24
27
|
export declare function bool(values: ScaffoldValues, name: string): boolean | undefined;
|
|
@@ -9,6 +9,7 @@ exports.portableOptions = portableOptions;
|
|
|
9
9
|
exports.nxSchemaFor = nxSchemaFor;
|
|
10
10
|
exports.usageFor = usageFor;
|
|
11
11
|
const recipe_1 = require("../../recipes/angular-distribution/recipe");
|
|
12
|
+
const amendments_1 = require("../../recipes/angular-weaver/amendments");
|
|
12
13
|
const recipe_2 = require("../../recipes/angular-weaver/recipe");
|
|
13
14
|
const recipe_3 = require("../../recipes/auth-source/recipe");
|
|
14
15
|
const recipe_4 = require("../../recipes/layout/recipe");
|
|
@@ -16,6 +17,7 @@ const recipe_5 = require("../../recipes/frame-plugin/recipe");
|
|
|
16
17
|
const recipe_6 = require("../../recipes/settings-store/recipe");
|
|
17
18
|
const recipe_7 = require("../../recipes/theme/recipe");
|
|
18
19
|
const generate_1 = require("../generate/generate");
|
|
20
|
+
const inputs_1 = require("./inputs");
|
|
19
21
|
function str(values, name) {
|
|
20
22
|
const value = values[name];
|
|
21
23
|
return typeof value === 'string' ? value : undefined;
|
|
@@ -154,27 +156,8 @@ exports.SCAFFOLDS = [
|
|
|
154
156
|
APP_OPTION,
|
|
155
157
|
...PLACEMENT_OPTIONS,
|
|
156
158
|
],
|
|
157
|
-
build: (values) =>
|
|
158
|
-
|
|
159
|
-
return (0, generate_1.generate)(recipe_2.angularWeaver, {
|
|
160
|
-
id: (_a = str(values, 'id')) !== null && _a !== void 0 ? _a : '',
|
|
161
|
-
name: str(values, 'name'),
|
|
162
|
-
prefix: str(values, 'prefix'),
|
|
163
|
-
importPath: str(values, 'importPath'),
|
|
164
|
-
features: {
|
|
165
|
-
command: bool(values, 'command'),
|
|
166
|
-
shortcut: str(values, 'shortcut'),
|
|
167
|
-
menu: str(values, 'menu'),
|
|
168
|
-
barItem: bool(values, 'barItem'),
|
|
169
|
-
settings: bool(values, 'settings'),
|
|
170
|
-
about: bool(values, 'about'),
|
|
171
|
-
instanceable: bool(values, 'instanceable'),
|
|
172
|
-
container: bool(values, 'container'),
|
|
173
|
-
access: str(values, 'access'),
|
|
174
|
-
spec: bool(values, 'spec'),
|
|
175
|
-
},
|
|
176
|
-
});
|
|
177
|
-
},
|
|
159
|
+
build: (values) => (0, generate_1.generate)(recipe_2.angularWeaver, (0, inputs_1.weaverInput)(values)),
|
|
160
|
+
amend: (values) => (0, amendments_1.weaverAmendments)((0, inputs_1.weaverInput)(values), str(values, 'directory')),
|
|
178
161
|
},
|
|
179
162
|
{
|
|
180
163
|
name: 'frame-plugin',
|
|
@@ -233,15 +216,8 @@ exports.SCAFFOLDS = [
|
|
|
233
216
|
},
|
|
234
217
|
...PLACEMENT_OPTIONS,
|
|
235
218
|
],
|
|
236
|
-
build: (values) =>
|
|
237
|
-
|
|
238
|
-
return (0, generate_1.generate)(recipe_1.angularDistribution, {
|
|
239
|
-
name: (_a = str(values, 'name')) !== null && _a !== void 0 ? _a : '',
|
|
240
|
-
title: str(values, 'title'),
|
|
241
|
-
directory: str(values, 'directory'),
|
|
242
|
-
styles: (_b = str(values, 'styles')) !== null && _b !== void 0 ? _b : 'tailwind',
|
|
243
|
-
});
|
|
244
|
-
},
|
|
219
|
+
build: (values) => (0, generate_1.generate)(recipe_1.angularDistribution, (0, inputs_1.distributionInput)(values)),
|
|
220
|
+
amend: (values) => (0, generate_1.amendments)(recipe_1.angularDistribution, (0, inputs_1.distributionInput)(values)),
|
|
245
221
|
},
|
|
246
222
|
{
|
|
247
223
|
name: 'auth-source',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffolds.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/lib/scaffolds/scaffolds.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"scaffolds.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/lib/scaffolds/scaffolds.ts"],"names":[],"mappings":";;;AA4CA,kBAGC;AAED,oBAMC;AAGD,8BAEC;AAyRD,oCAEC;AAGD,0CAIC;AAOD,kCA0BC;AAED,4BAOC;AAxYD,sEAGmD;AACnD,wEAA2E;AAC3E,gEAAoE;AACpE,6DAA8D;AAC9D,wDAAqD;AACrD,8DAAgE;AAChE,gEAAoE;AACpE,uDAAqE;AAErE,mDAA4D;AAE5D,qCAA0D;AA8B1D,SAAgB,GAAG,CAAC,MAAsB,EAAE,IAAY;IACtD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC;AAED,SAAgB,IAAI,CAClB,MAAsB,EACtB,IAAY;IAEZ,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACxD,CAAC;AAED,uFAAuF;AACvF,SAAgB,SAAS,CAAC,IAAY;IACpC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,GAAG,+BAA+B,CAAC;AAEnD,MAAM,iBAAiB,GAA8B;IACnD;QACE,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,+CAA+C;QAC5D,aAAa,EAAE,IAAI;KACpB;IACD;QACE,IAAI,EAAE,MA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;QACrD,MAAM,IAAI,GAAG,KAAK,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,MAAM,CAAC,IAAI,GAAG,CAAC;QAC3E,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC;IAC9C,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.distributionAmendments = distributionAmendments;
|
|
4
|
+
function distributionAmendments(d) {
|
|
5
|
+
return [
|
|
6
|
+
...(d.styles === 'tailwind'
|
|
7
|
+
? [
|
|
8
|
+
{
|
|
9
|
+
kind: 'postcss',
|
|
10
|
+
file: '.postcssrc.json',
|
|
11
|
+
plugin: '@tailwindcss/postcss',
|
|
12
|
+
},
|
|
13
|
+
]
|
|
14
|
+
: []),
|
|
15
|
+
{
|
|
16
|
+
kind: 'build-target',
|
|
17
|
+
styles: ['src/styles.css'],
|
|
18
|
+
assets: [
|
|
19
|
+
{ glob: '**/*', input: 'public', from: 'project' },
|
|
20
|
+
{
|
|
21
|
+
glob: '**/*',
|
|
22
|
+
input: 'node_modules/@loomweaver/shell/i18n',
|
|
23
|
+
from: 'workspace',
|
|
24
|
+
output: 'i18n',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
glob: '**/*',
|
|
28
|
+
input: 'node_modules/@loomweaver/frame-kit/dist',
|
|
29
|
+
from: 'workspace',
|
|
30
|
+
output: 'frame-kit',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
serviceWorker: 'ngsw-config.json',
|
|
34
|
+
inlineCritical: false,
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=amendments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amendments.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/recipes/angular-distribution/amendments.ts"],"names":[],"mappings":";;AAGA,wDAmCC;AAnCD,SAAgB,sBAAsB,CACpC,CAAuB;IAEvB,OAAO;QACL,GAAG,CAAC,CAAC,CAAC,MAAM,KAAK,UAAU;YACzB,CAAC,CAAC;gBACE;oBACE,IAAI,EAAE,SAAkB;oBACxB,IAAI,EAAE,iBAA0B;oBAChC,MAAM,EAAE,sBAAsB;iBAC/B;aACF;YACH,CAAC,CAAC,EAAE,CAAC;QACP;YACE,IAAI,EAAE,cAAuB;YAC7B,MAAM,EAAE,CAAC,gBAAgB,CAAC;YAC1B,MAAM,EAAE;gBACN,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAkB,EAAE;gBAC3D;oBACE,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,qCAAqC;oBAC5C,IAAI,EAAE,WAAoB;oBAC1B,MAAM,EAAE,MAAM;iBACf;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,yCAAyC;oBAChD,IAAI,EAAE,WAAoB;oBAC1B,MAAM,EAAE,WAAW;iBACpB;aACF;YACD,aAAa,EAAE,kBAAkB;YACjC,cAAc,EAAE,KAAK;SACtB;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.angularDistribution = void 0;
|
|
4
4
|
exports.resolveDistributionInput = resolveDistributionInput;
|
|
5
|
+
const amendments_1 = require("./amendments");
|
|
5
6
|
const casing_1 = require("../../lib/generate/casing");
|
|
6
7
|
const shell_regions_1 = require("../shell-regions");
|
|
7
8
|
const logo_1 = require("./logo");
|
|
@@ -229,20 +230,15 @@ function stylesNotes(d) {
|
|
|
229
230
|
}
|
|
230
231
|
return [
|
|
231
232
|
"`src/styles.css` compiles the shell's source theme with Tailwind 4, which is also what lets you",
|
|
232
|
-
'write Tailwind utilities in your own templates.
|
|
233
|
-
'you
|
|
233
|
+
'write Tailwind utilities in your own templates. The scaffold wrote `.postcssrc.json` beside your',
|
|
234
|
+
'`package.json` for you, because without it the stylesheet is read as plain CSS: no utility class',
|
|
235
|
+
'is emitted, the workbench renders unstyled, and the build still reports success. The packages are',
|
|
236
|
+
'the one thing left, because a scaffold does not install:',
|
|
234
237
|
'',
|
|
235
238
|
'```sh',
|
|
236
239
|
'npm install -D tailwindcss @tailwindcss/postcss @tailwindcss/typography',
|
|
237
240
|
'```',
|
|
238
241
|
'',
|
|
239
|
-
'and the PostCSS plugin, in a file next to your `package.json`:',
|
|
240
|
-
'',
|
|
241
|
-
'```jsonc',
|
|
242
|
-
'// .postcssrc.json',
|
|
243
|
-
'{ "plugins": { "@tailwindcss/postcss": {} } }',
|
|
244
|
-
'```',
|
|
245
|
-
'',
|
|
246
242
|
'Use **semantic tokens only** in your own templates (`bg-surface`, `text-content`, `text-brand`,',
|
|
247
243
|
'`border-border`), never raw palette colours.',
|
|
248
244
|
'',
|
|
@@ -328,39 +324,25 @@ function readme(d) {
|
|
|
328
324
|
'',
|
|
329
325
|
'## Build wiring',
|
|
330
326
|
'',
|
|
331
|
-
'The
|
|
332
|
-
'
|
|
333
|
-
'
|
|
334
|
-
'
|
|
335
|
-
'',
|
|
336
|
-
'
|
|
337
|
-
'
|
|
338
|
-
'
|
|
339
|
-
'
|
|
340
|
-
'
|
|
341
|
-
'
|
|
342
|
-
'
|
|
343
|
-
|
|
344
|
-
'
|
|
345
|
-
'',
|
|
346
|
-
'
|
|
347
|
-
'',
|
|
348
|
-
'
|
|
349
|
-
'
|
|
350
|
-
'```',
|
|
351
|
-
'',
|
|
352
|
-
'Each of those earns its place. The **`@loomweaver/shell/i18n` glob** is the one whose absence is easy',
|
|
353
|
-
'to misread: the shell fetches its own UI strings at runtime, so without it every label in the',
|
|
354
|
-
'chrome renders as its raw translation key and nothing errors. The **frame-kit** glob only',
|
|
355
|
-
'matters if you host sandboxed (iframe) plugins — install that package then; until you do, the',
|
|
356
|
-
'glob simply matches nothing. **`serviceWorker`** emits the worker that `provideShell()` already',
|
|
357
|
-
'registers for you (inert in dev) — never add `provideServiceWorker` yourself, and if you would',
|
|
358
|
-
'rather ship no worker at all, drop `ngsw-config.json` and pass',
|
|
359
|
-
'`provideShell({ serviceWorker: false })`, because otherwise the registration 404s in production.',
|
|
360
|
-
'**`inlineCritical: false`** is not optional here: the `index.html` above ships a strict',
|
|
361
|
-
"`script-src 'self'`, and Angular's critical-CSS pass loads the stylesheet with an **inline**",
|
|
362
|
-
'`onload` handler that the policy blocks — the app then renders completely unstyled, and only in',
|
|
363
|
-
'production builds.',
|
|
327
|
+
'The scaffold did this. Your build target now names the stylesheet, three asset globs, the',
|
|
328
|
+
'service worker and one production setting, and the run that wrote these files listed each one it',
|
|
329
|
+
'added. Anything you had already set was left exactly as you set it.',
|
|
330
|
+
'',
|
|
331
|
+
'What each is for, so that nobody removes one as clutter. The **`@loomweaver/shell/i18n` glob**',
|
|
332
|
+
'serves the strings the shell fetches at runtime; without it every label in the chrome renders as',
|
|
333
|
+
'its raw translation key and nothing errors. The **frame-kit** glob only matters if you host',
|
|
334
|
+
'sandboxed (iframe) plugins — until you install that package the glob simply matches nothing.',
|
|
335
|
+
'**`serviceWorker`** emits the worker that `provideShell()` already registers for you (inert in',
|
|
336
|
+
'dev) — never add `provideServiceWorker` yourself, and if you would rather ship no worker at all,',
|
|
337
|
+
'drop `ngsw-config.json` and pass `provideShell({ serviceWorker: false })`, because otherwise the',
|
|
338
|
+
'registration 404s in production. **`optimization.styles.inlineCritical: false`** is not optional:',
|
|
339
|
+
"the `index.html` above ships a strict `script-src 'self'`, and Angular's critical-CSS pass loads",
|
|
340
|
+
'the stylesheet with an **inline** `onload` handler that the policy blocks — the app then renders',
|
|
341
|
+
'completely unstyled, and only in production builds.',
|
|
342
|
+
'',
|
|
343
|
+
'One thing is still yours, because the scaffold cannot know your budget: a production build warns',
|
|
344
|
+
"that the initial bundle exceeds Angular's 500 kB default. The shell is a whole application",
|
|
345
|
+
'chrome, so raise the budgets in your build target.',
|
|
364
346
|
'',
|
|
365
347
|
'## Ship less than the whole workbench',
|
|
366
348
|
'',
|
|
@@ -399,6 +381,9 @@ function readme(d) {
|
|
|
399
381
|
}
|
|
400
382
|
exports.angularDistribution = {
|
|
401
383
|
id: 'angular-distribution',
|
|
384
|
+
amend(input) {
|
|
385
|
+
return (0, amendments_1.distributionAmendments)(resolveDistributionInput(input));
|
|
386
|
+
},
|
|
402
387
|
build(input) {
|
|
403
388
|
const d = resolveDistributionInput(input);
|
|
404
389
|
return Object.assign(Object.assign({ 'src/main.ts': mainTs(), 'src/app/app.config.ts': appConfigTs(d) }, (d.withTests ? { 'src/app/app.config.spec.ts': appConfigSpec() } : {})), { 'src/app/app.ts': appTs(), 'src/app/app.html': appHtml(), 'src/index.html': indexHtml(d), 'src/styles.css': stylesCss(d), 'public/logo.svg': logo_1.PLACEHOLDER_LOGO_SVG, 'public/manifest.webmanifest': manifest(d) + '\n', 'ngsw-config.json': ngswConfig() + '\n', 'LOOMWEAVER.md': readme(d) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipe.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/recipes/angular-distribution/recipe.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"recipe.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/recipes/angular-distribution/recipe.ts"],"names":[],"mappings":";;;AAkCA,4DA0BC;AA3DD,6CAAsD;AAEtD,sDAAmE;AACnE,oDAAiD;AACjD,iCAA8C;AA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,CAAC,CAAC,CAAC,GAAG,IAAI,EACjD,kBAAkB,EAAE,UAAU,EAAE,GAAG,IAAI,EACvC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC,IAC1B;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.weaverAmendments = weaverAmendments;
|
|
4
|
+
const recipe_1 = require("./recipe");
|
|
5
|
+
function weaverAmendments(input, where) {
|
|
6
|
+
const w = (0, recipe_1.resolveWeaverInput)(input);
|
|
7
|
+
const directory = (where !== null && where !== void 0 ? where : '').replace(/^\.?\/*/, '').replace(/\/+$/, '');
|
|
8
|
+
if (!directory) {
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
return [
|
|
12
|
+
{
|
|
13
|
+
kind: 'build-target',
|
|
14
|
+
styles: [],
|
|
15
|
+
assets: [
|
|
16
|
+
{
|
|
17
|
+
glob: '**/*.json',
|
|
18
|
+
input: `${directory}/src/lib/i18n`,
|
|
19
|
+
from: 'workspace',
|
|
20
|
+
output: `i18n/${w.id}`,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
{ kind: 'stylesheet-source', sourceRoot: `${directory}/src` },
|
|
25
|
+
{
|
|
26
|
+
kind: 'compose-plugin',
|
|
27
|
+
id: w.id,
|
|
28
|
+
symbol: `${w.propertyName}Plugin`,
|
|
29
|
+
capabilities: w.capabilities,
|
|
30
|
+
sourceRoot: `${directory}/src`,
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=amendments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amendments.js","sourceRoot":"","sources":["../../../../../../../libs/tooling/devkit/src/recipes/angular-weaver/amendments.ts"],"names":[],"mappings":";;AAGA,4CA+BC;AAjCD,qCAA2D;AAE3D,SAAgB,gBAAgB,CAC9B,KAAkB,EAClB,KAAyB;IAEzB,MAAM,CAAC,GAAG,IAAA,2BAAkB,EAAC,KAAK,CAAC,CAAC;IACpC,MAAM,SAAS,GAAG,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC3E,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO;QACL;YACE,IAAI,EAAE,cAAc;YACpB,MAAM,EAAE,EAAE;YACV,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,WAAW;oBACjB,KAAK,EAAE,GAAG,SAAS,eAAe;oBAClC,IAAI,EAAE,WAAW;oBACjB,MAAM,EAAE,QAAQ,CAAC,CAAC,EAAE,EAAE;iBACvB;aACF;SACF;QACD,EAAE,IAAI,EAAE,mBAAmB,EAAE,UAAU,EAAE,GAAG,SAAS,MAAM,EAAE;QAC7D;YACE,IAAI,EAAE,gBAAgB;YACtB,EAAE,EAAE,CAAC,CAAC,EAAE;YACR,MAAM,EAAE,GAAG,CAAC,CAAC,YAAY,QAAQ;YACjC,YAAY,EAAE,CAAC,CAAC,YAAY;YAC5B,UAAU,EAAE,GAAG,SAAS,MAAM;SAC/B;KACF,CAAC;AACJ,CAAC"}
|