@ts-ioc-container/bundler 2.1.0 → 3.1.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/AGENTS.md +32 -22
- package/README.md +84 -84
- package/cjm/exceptions/DomainException.js +1 -7
- package/cjm/features/build/BuildConfig.js +48 -73
- package/cjm/features/build/domain/ImportPaths.js +13 -29
- package/cjm/features/build/domain/emit.js +2 -2
- package/cjm/features/build/domain/scan.js +0 -18
- package/cjm/features/build/domain/tokenCollisions.js +1 -1
- package/cjm/features/build/domain/tsconfig.js +16 -10
- package/cjm/features/build/services/BundleBuilder.js +8 -31
- package/cjm/index.js +2 -4
- package/cjm/schema/ticConfigSchema.js +1 -5
- package/package.json +2 -2
- package/tic.schema.json +85 -103
- package/tpl/index.cjs +19 -41
- package/typings/app.d.ts +1 -2
- package/typings/exceptions/DomainException.d.ts +0 -4
- package/typings/exceptions/DomainException.d.ts.map +1 -1
- package/typings/features/build/BuildConfig.d.ts +71 -82
- package/typings/features/build/BuildConfig.d.ts.map +1 -1
- package/typings/features/build/BuildController.d.ts +0 -1
- package/typings/features/build/BuildController.d.ts.map +1 -1
- package/typings/features/build/domain/ImportPaths.d.ts +13 -11
- package/typings/features/build/domain/ImportPaths.d.ts.map +1 -1
- package/typings/features/build/domain/emit.d.ts +1 -7
- package/typings/features/build/domain/emit.d.ts.map +1 -1
- package/typings/features/build/domain/scan.d.ts +0 -2
- package/typings/features/build/domain/scan.d.ts.map +1 -1
- package/typings/features/build/domain/tsconfig.d.ts +11 -15
- package/typings/features/build/domain/tsconfig.d.ts.map +1 -1
- package/typings/features/build/services/BundleBuilder.d.ts +5 -8
- package/typings/features/build/services/BundleBuilder.d.ts.map +1 -1
- package/typings/index.d.ts +4 -4
- package/typings/schema/ticConfigSchema.d.ts.map +1 -1
|
@@ -37,7 +37,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.isSourceFile = void 0;
|
|
40
|
-
exports.listSourceFiles = listSourceFiles;
|
|
41
40
|
exports.findClasses = findClasses;
|
|
42
41
|
const node_fs_1 = require("node:fs");
|
|
43
42
|
const node_path_1 = __importDefault(require("node:path"));
|
|
@@ -46,23 +45,6 @@ const SOURCE_FILE = /\.(tsx?|mts|cts)$/;
|
|
|
46
45
|
const DECLARATION_FILE = /\.d\.[mc]?tsx?$/;
|
|
47
46
|
const isSourceFile = (file) => SOURCE_FILE.test(file) && !DECLARATION_FILE.test(file);
|
|
48
47
|
exports.isSourceFile = isSourceFile;
|
|
49
|
-
function listSourceFiles(dir, recursive, isExcluded) {
|
|
50
|
-
const files = [];
|
|
51
|
-
const walk = (current) => {
|
|
52
|
-
for (const entry of (0, node_fs_1.readdirSync)(current, { withFileTypes: true })) {
|
|
53
|
-
const full = node_path_1.default.join(current, entry.name);
|
|
54
|
-
if (entry.isDirectory()) {
|
|
55
|
-
if (recursive && entry.name !== 'node_modules')
|
|
56
|
-
walk(full);
|
|
57
|
-
}
|
|
58
|
-
else if ((0, exports.isSourceFile)(entry.name) && !isExcluded(full)) {
|
|
59
|
-
files.push(full);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
walk(dir);
|
|
64
|
-
return files.sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));
|
|
65
|
-
}
|
|
66
48
|
const hasModifier = (node, kind) => ts.canHaveModifiers(node) && (ts.getModifiers(node) ?? []).some((m) => m.kind === kind);
|
|
67
49
|
function decoratorName(decorator, imports) {
|
|
68
50
|
const callee = ts.isCallExpression(decorator.expression) ? decorator.expression.expression : decorator.expression;
|
|
@@ -17,7 +17,7 @@ function tokenCollisions(classes) {
|
|
|
17
17
|
.map(([token, group]) => {
|
|
18
18
|
const names = group.map((cls) => cls.className);
|
|
19
19
|
return (`decorator token "${token}" is passed by ${names.join(', ')}; ` +
|
|
20
|
-
`registration is last-wins, exclude one with classes.excludeClasses`);
|
|
20
|
+
`registration is last-wins, exclude one with compilerOptions.classes.excludeClasses`);
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
function scopeDisjoint(group) {
|
|
@@ -57,22 +57,28 @@ function commonDir(files) {
|
|
|
57
57
|
}
|
|
58
58
|
return first.slice(0, length).join(node_path_1.default.sep) || node_path_1.default.sep;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
if (!(0, node_fs_1.existsSync)(tsconfig.file)) {
|
|
62
|
-
if (tsconfig.required)
|
|
63
|
-
throw new DomainException_1.TicConfigError(`tsconfig not found: ${tsconfig.file}`);
|
|
64
|
-
return {
|
|
60
|
+
function asTsconfig(config) {
|
|
61
|
+
if (!(0, node_fs_1.existsSync)(config.tsconfig.file)) {
|
|
62
|
+
if (config.tsconfig.required)
|
|
63
|
+
throw new DomainException_1.TicConfigError(`tsconfig not found: ${config.tsconfig.file}`);
|
|
64
|
+
return { config: config.overrides };
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
if (config.file === config.tsconfig.file)
|
|
67
|
+
return ts.readConfigFile(config.file, ts.sys.readFile);
|
|
68
|
+
return { config: { extends: config.tsconfig.file, ...config.overrides } };
|
|
69
|
+
}
|
|
70
|
+
function loadTsconfig(config) {
|
|
71
|
+
const { config: json, error } = asTsconfig(config);
|
|
72
|
+
const configFileName = config.file === config.tsconfig.file ? config.file : undefined;
|
|
73
|
+
const parsed = ts.parseJsonConfigFileContent(json ?? {}, ts.sys, config.dir, undefined, configFileName);
|
|
68
74
|
const [fatal] = [error, ...parsed.errors].filter((d) => !!d && d.code !== NO_INPUTS);
|
|
69
75
|
if (fatal) {
|
|
70
|
-
throw new DomainException_1.TicConfigError(`${
|
|
76
|
+
throw new DomainException_1.TicConfigError(`${config.file}: ${ts.flattenDiagnosticMessageText(fatal.messageText, '\n')}`);
|
|
71
77
|
}
|
|
72
78
|
const fileNames = parsed.fileNames.map((file) => node_path_1.default.resolve(file));
|
|
73
79
|
return {
|
|
74
|
-
importPaths: ImportPaths_1.ImportPaths.fromOptions(parsed.options,
|
|
80
|
+
importPaths: ImportPaths_1.ImportPaths.fromOptions(parsed.options, config.file, config.importExtension),
|
|
75
81
|
fileNames,
|
|
76
|
-
rootDir: parsed.options.rootDir ?? commonDir(fileNames.filter(scan_1.isSourceFile)) ??
|
|
82
|
+
rootDir: parsed.options.rootDir ?? commonDir(fileNames.filter(scan_1.isSourceFile)) ?? config.dir,
|
|
77
83
|
};
|
|
78
84
|
}
|
|
@@ -19,7 +19,6 @@ exports.BundleBuilder = exports.IBundleBuilderKey = void 0;
|
|
|
19
19
|
const node_path_1 = __importDefault(require("node:path"));
|
|
20
20
|
const ts_ioc_container_1 = require("ts-ioc-container");
|
|
21
21
|
const GlobalConfig_1 = require("../../../domain/GlobalConfig");
|
|
22
|
-
const DomainException_1 = require("../../../exceptions/DomainException");
|
|
23
22
|
const HandlebarsRenderService_1 = require("../../../services/HandlebarsRenderService");
|
|
24
23
|
const NodeFileSystemService_1 = require("../../../services/NodeFileSystemService");
|
|
25
24
|
const BuildConfig_1 = require("../BuildConfig");
|
|
@@ -30,6 +29,7 @@ const scan_1 = require("../domain/scan");
|
|
|
30
29
|
const tokenCollisions_1 = require("../domain/tokenCollisions");
|
|
31
30
|
const tsconfig_1 = require("../domain/tsconfig");
|
|
32
31
|
const TicConfigService_1 = require("./TicConfigService");
|
|
32
|
+
const DEFAULT_EXCLUDE_GLOBS = BuildConfig_1.DEFAULT_EXCLUDE.map(glob_1.globToRegExp);
|
|
33
33
|
exports.IBundleBuilderKey = new ts_ioc_container_1.SingleToken('IBundleBuilder');
|
|
34
34
|
let BundleBuilder = class BundleBuilder {
|
|
35
35
|
cwd;
|
|
@@ -54,41 +54,20 @@ let BundleBuilder = class BundleBuilder {
|
|
|
54
54
|
return {
|
|
55
55
|
config: resolved.file,
|
|
56
56
|
output: { file: output, bundle: resolved.className, status, registrations, content },
|
|
57
|
-
warnings
|
|
57
|
+
warnings,
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
generate(config) {
|
|
61
|
-
const { importPaths: paths, fileNames, rootDir } = (0, tsconfig_1.loadTsconfig)(config
|
|
62
|
-
const output = config.output ??
|
|
63
|
-
if (output === undefined)
|
|
64
|
-
throw new DomainException_1.TicConfigError('output: required when there is no tsconfig to extend');
|
|
65
|
-
const relative = (file) => (0, glob_1.toPosix)(node_path_1.default.relative(config.dir, file));
|
|
66
|
-
const { include, exclude } = config.files;
|
|
61
|
+
const { importPaths: paths, fileNames, rootDir } = (0, tsconfig_1.loadTsconfig)(config);
|
|
62
|
+
const output = config.output ?? node_path_1.default.join(rootDir, `${config.name}.bundle.ts`);
|
|
67
63
|
const isExcluded = (file) => {
|
|
68
64
|
if (file === output)
|
|
69
65
|
return true;
|
|
70
|
-
const filename = relative(file);
|
|
71
|
-
|
|
72
|
-
return true;
|
|
73
|
-
return exclude.some((glob) => glob.test(filename));
|
|
66
|
+
const filename = (0, glob_1.toPosix)(node_path_1.default.relative(config.dir, file));
|
|
67
|
+
return DEFAULT_EXCLUDE_GLOBS.some((glob) => glob.test(filename));
|
|
74
68
|
};
|
|
75
|
-
const files =
|
|
76
|
-
|
|
77
|
-
for (const entry of config.files.paths) {
|
|
78
|
-
const dir = paths.resolveNamespace(entry.path, config.dir);
|
|
79
|
-
for (const file of (0, scan_1.listSourceFiles)(dir, entry.recursive, isExcluded))
|
|
80
|
-
files.add(file);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
else if (fileNames) {
|
|
84
|
-
for (const file of fileNames)
|
|
85
|
-
if ((0, scan_1.isSourceFile)(file) && !isExcluded(file))
|
|
86
|
-
files.add(file);
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
throw new DomainException_1.TicConfigError(`files.paths: required when there is no tsconfig to extend (${config.tsconfig.file} not found)`);
|
|
90
|
-
}
|
|
91
|
-
const classes = [...files]
|
|
69
|
+
const files = fileNames.filter((file) => (0, scan_1.isSourceFile)(file) && !isExcluded(file));
|
|
70
|
+
const classes = files
|
|
92
71
|
.sort((a, b) => (a < b ? -1 : a > b ? 1 : 0))
|
|
93
72
|
.flatMap((file) => {
|
|
94
73
|
const text = this.fs.readFile(file);
|
|
@@ -98,8 +77,6 @@ let BundleBuilder = class BundleBuilder {
|
|
|
98
77
|
const content = this.renderer.render(emit_1.BUNDLE_PROTOCOL, (0, emit_1.bundleView)({
|
|
99
78
|
name: config.className,
|
|
100
79
|
configPath: (0, glob_1.toPosix)(node_path_1.default.relative(node_path_1.default.dirname(output), config.file)),
|
|
101
|
-
paths: config.files.paths?.map((entry) => entry.path),
|
|
102
|
-
tsconfigPath: (0, glob_1.toPosix)(node_path_1.default.relative(node_path_1.default.dirname(output), config.tsconfig.file)),
|
|
103
80
|
classes,
|
|
104
81
|
}));
|
|
105
82
|
return { output, content, registrations: classes.length, warnings: (0, tokenCollisions_1.tokenCollisions)(classes) };
|
package/cjm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StdOutputService = exports.IOutputServiceKey = exports.CommonModule = exports.HelpModule = exports.globToRegExp = exports.tokenCollisions = exports.GENERATED_HEADER = exports.BUNDLE_PROTOCOL = exports.bundleView = exports.emitBundle = exports.
|
|
4
|
-
exports.ExceptionHandler = exports.StaleBundlesError = exports.UsageError = exports.UnknownActionError = exports.UnknownCommandError = exports.MissingCommandError = exports.
|
|
3
|
+
exports.ILoggerKey = exports.StdOutputService = exports.IOutputServiceKey = exports.CommonModule = exports.HelpModule = exports.globToRegExp = exports.tokenCollisions = exports.GENERATED_HEADER = exports.BUNDLE_PROTOCOL = exports.bundleView = exports.emitBundle = exports.isSourceFile = exports.findClasses = exports.loadTsconfig = exports.ImportPaths = exports.ticConfigJsonSchema = exports.findPackageRoot = exports.findConfigFiles = exports.toClassName = exports.DEFAULT_DECORATORS = exports.DEFAULT_BUNDLE_NAME = exports.DEFAULT_EXCLUDE = exports.DEFAULT_EXTENDS = exports.CONFIG_FILE_SUFFIXES = exports.BUNDLE_CONFIG_SCHEMA = exports.resolveConfig = exports.TSCONFIG_FILE = exports.ITicConfigServiceKey = exports.TicConfigService = exports.IBundleBuilderKey = exports.BundleBuilder = exports.BUILD_OPTIONS = exports.BuildController = exports.BuildModule = exports.USAGE = exports.IErrorHandlerKey = exports.validate = exports.parseOptions = exports.commandArgs = exports.DEFAULT_ACTION = exports.onDefault = exports.action = exports.Application = exports.globalConfig = exports.GlobalConfigKey = exports.CliIoKey = exports.createContainer = exports.loadConfig = exports.run = exports.build = void 0;
|
|
4
|
+
exports.ExceptionHandler = exports.StaleBundlesError = exports.UsageError = exports.UnknownActionError = exports.UnknownCommandError = exports.MissingCommandError = exports.TicConfigError = exports.TicError = exports.renderProtocol = exports.HandlebarsRenderService = exports.IRenderServiceKey = exports.NodeFileSystemService = exports.IFileSystemServiceKey = exports.ConsoleLogger = void 0;
|
|
5
5
|
var app_1 = require("./app");
|
|
6
6
|
Object.defineProperty(exports, "build", { enumerable: true, get: function () { return app_1.build; } });
|
|
7
7
|
Object.defineProperty(exports, "run", { enumerable: true, get: function () { return app_1.run; } });
|
|
@@ -55,7 +55,6 @@ Object.defineProperty(exports, "loadTsconfig", { enumerable: true, get: function
|
|
|
55
55
|
var scan_1 = require("./features/build/domain/scan");
|
|
56
56
|
Object.defineProperty(exports, "findClasses", { enumerable: true, get: function () { return scan_1.findClasses; } });
|
|
57
57
|
Object.defineProperty(exports, "isSourceFile", { enumerable: true, get: function () { return scan_1.isSourceFile; } });
|
|
58
|
-
Object.defineProperty(exports, "listSourceFiles", { enumerable: true, get: function () { return scan_1.listSourceFiles; } });
|
|
59
58
|
var emit_1 = require("./features/build/domain/emit");
|
|
60
59
|
Object.defineProperty(exports, "emitBundle", { enumerable: true, get: function () { return emit_1.emitBundle; } });
|
|
61
60
|
Object.defineProperty(exports, "bundleView", { enumerable: true, get: function () { return emit_1.bundleView; } });
|
|
@@ -85,7 +84,6 @@ Object.defineProperty(exports, "renderProtocol", { enumerable: true, get: functi
|
|
|
85
84
|
var DomainException_1 = require("./exceptions/DomainException");
|
|
86
85
|
Object.defineProperty(exports, "TicError", { enumerable: true, get: function () { return DomainException_1.TicError; } });
|
|
87
86
|
Object.defineProperty(exports, "TicConfigError", { enumerable: true, get: function () { return DomainException_1.TicConfigError; } });
|
|
88
|
-
Object.defineProperty(exports, "NamespaceNotFoundError", { enumerable: true, get: function () { return DomainException_1.NamespaceNotFoundError; } });
|
|
89
87
|
Object.defineProperty(exports, "MissingCommandError", { enumerable: true, get: function () { return DomainException_1.MissingCommandError; } });
|
|
90
88
|
Object.defineProperty(exports, "UnknownCommandError", { enumerable: true, get: function () { return DomainException_1.UnknownCommandError; } });
|
|
91
89
|
Object.defineProperty(exports, "UnknownActionError", { enumerable: true, get: function () { return DomainException_1.UnknownActionError; } });
|
|
@@ -8,17 +8,13 @@ function ticConfigJsonSchema() {
|
|
|
8
8
|
io: 'input',
|
|
9
9
|
target: 'draft-7',
|
|
10
10
|
unrepresentable: 'any',
|
|
11
|
-
override: ({ jsonSchema }) => {
|
|
12
|
-
if (jsonSchema.type === 'object')
|
|
13
|
-
jsonSchema.additionalProperties = false;
|
|
14
|
-
},
|
|
15
11
|
});
|
|
16
12
|
const { $schema, ...rest } = schema;
|
|
17
13
|
return {
|
|
18
14
|
$schema,
|
|
19
15
|
$id: 'https://github.com/IgorBabkin/ts-ioc-container/tree/main/packages/bundler/tic.schema.json',
|
|
20
16
|
title: '*.bundle.json / *.bundle.yaml',
|
|
21
|
-
description: "One bundle generated by `tic build` (@ts-ioc-container/bundler). `tic build` builds every `*.bundle.json` / `*.bundle.yaml` / `*.bundle.yml` at the root of the package it is invoked in, or — with none — one bundle from that package's tsconfig.json with every setting at its default.
|
|
17
|
+
description: "One bundle generated by `tic build` (@ts-ioc-container/bundler). `tic build` builds every `*.bundle.json` / `*.bundle.yaml` / `*.bundle.yml` at the root of the package it is invoked in, or — with none — one bundle from that package's tsconfig.json with every setting at its default. `extends` and `baseUrl` resolve against this file's directory; `include`, `exclude` and `output` resolve against `baseUrl`, defaulting to this file's directory.",
|
|
22
18
|
...rest,
|
|
23
19
|
};
|
|
24
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ts-ioc-container/bundler",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Bundles your dependencies into a single container module for ts-ioc-container: the `tic` CLI scans folders (by path or tsconfig alias) and generates one typed bundle that registers every class — `container.useModule(new AppBundle())`.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"reflect-metadata": "^0.2.2",
|
|
53
53
|
"yaml": "^2.8.3",
|
|
54
54
|
"zod": "^4.6.5",
|
|
55
|
-
"ts-ioc-container": "
|
|
55
|
+
"ts-ioc-container": "75.0.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"typescript": ">=5"
|
package/tic.schema.json
CHANGED
|
@@ -2,14 +2,25 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://github.com/IgorBabkin/ts-ioc-container/tree/main/packages/bundler/tic.schema.json",
|
|
4
4
|
"title": "*.bundle.json / *.bundle.yaml",
|
|
5
|
-
"description": "One bundle generated by `tic build` (@ts-ioc-container/bundler). `tic build` builds every `*.bundle.json` / `*.bundle.yaml` / `*.bundle.yml` at the root of the package it is invoked in, or — with none — one bundle from that package's tsconfig.json with every setting at its default.
|
|
5
|
+
"description": "One bundle generated by `tic build` (@ts-ioc-container/bundler). `tic build` builds every `*.bundle.json` / `*.bundle.yaml` / `*.bundle.yml` at the root of the package it is invoked in, or — with none — one bundle from that package's tsconfig.json with every setting at its default. `extends` and `baseUrl` resolve against this file's directory; `include`, `exclude` and `output` resolve against `baseUrl`, defaulting to this file's directory.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
8
|
"$schema": {
|
|
9
9
|
"type": "string"
|
|
10
10
|
},
|
|
11
|
+
"extends": {
|
|
12
|
+
"default": "./tsconfig.json",
|
|
13
|
+
"description": "The tsconfig this bundle extends, as a tsconfig's own `extends`: its file set, `paths` aliases and module resolution apply unless this file overrides them. Relative to this file. The default may be absent; a tsconfig named here must exist.",
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1
|
|
16
|
+
},
|
|
17
|
+
"baseUrl": {
|
|
18
|
+
"description": "The base folder this config's relative `include`, `exclude` and `output` resolve against, so they need not repeat a shared prefix such as `src`. Relative to this file; default this file's directory. Also handed to TypeScript as `compilerOptions.baseUrl` (unless that is set too), so generated imports use it.",
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1
|
|
21
|
+
},
|
|
11
22
|
"output": {
|
|
12
|
-
"description": "The bundle file (convention: *.bundle.ts). Default `<root>/<name>.bundle.ts`: <root> is the
|
|
23
|
+
"description": "The bundle file (convention: *.bundle.ts). Default `<root>/<name>.bundle.ts`: <root> is the compiled rootDir, else the common folder of the files compiled.",
|
|
13
24
|
"type": "string",
|
|
14
25
|
"minLength": 1
|
|
15
26
|
},
|
|
@@ -18,125 +29,96 @@
|
|
|
18
29
|
"type": "string",
|
|
19
30
|
"pattern": "^[A-Za-z][\\w-]*$"
|
|
20
31
|
},
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"description": "Tags associated with the bundle.",
|
|
32
|
+
"include": {
|
|
33
|
+
"description": "tsconfig `include`: replaces the extended tsconfig's. Relative to `baseUrl`. When `baseUrl` is set and this is omitted, the whole `baseUrl` folder (`.`) is scanned.",
|
|
24
34
|
"type": "array",
|
|
25
35
|
"items": {
|
|
26
36
|
"type": "string",
|
|
27
37
|
"minLength": 1
|
|
28
38
|
}
|
|
29
39
|
},
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"description": "Extension of generated imports, e.g. \".js\". Inferred from the tsconfig: \".js\" under node16/nodenext resolution, none otherwise.",
|
|
38
|
-
"type": "string"
|
|
40
|
+
"exclude": {
|
|
41
|
+
"description": "tsconfig `exclude`: replaces the extended tsconfig's. Relative to `baseUrl`.",
|
|
42
|
+
"type": "array",
|
|
43
|
+
"items": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1
|
|
46
|
+
}
|
|
39
47
|
},
|
|
40
|
-
"
|
|
48
|
+
"compilerOptions": {
|
|
41
49
|
"type": "object",
|
|
42
50
|
"properties": {
|
|
43
|
-
"
|
|
44
|
-
"description": "
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
"importExtension": {
|
|
52
|
+
"description": "Extension of generated imports, e.g. \".js\". Inferred from the tsconfig: \".js\" under node16/nodenext resolution, none otherwise.",
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
"classes": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"properties": {
|
|
58
|
+
"export": {
|
|
59
|
+
"default": "any",
|
|
60
|
+
"description": "Which exports count.",
|
|
61
|
+
"type": "string",
|
|
62
|
+
"enum": [
|
|
63
|
+
"any",
|
|
64
|
+
"named",
|
|
65
|
+
"default"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"decorators": {
|
|
69
|
+
"default": [
|
|
70
|
+
"register"
|
|
71
|
+
],
|
|
72
|
+
"description": "The class must carry one of these decorators, recognised by name (e.g. \"register\", or a composed decorator). Default [\"register\"]; [] requires none.",
|
|
73
|
+
"type": "array",
|
|
74
|
+
"items": {
|
|
50
75
|
"type": "string",
|
|
51
76
|
"minLength": 1
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"type": "object",
|
|
55
|
-
"properties": {
|
|
56
|
-
"path": {
|
|
57
|
-
"type": "string",
|
|
58
|
-
"minLength": 1
|
|
59
|
-
},
|
|
60
|
-
"recursive": {
|
|
61
|
-
"default": true,
|
|
62
|
-
"type": "boolean"
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"required": ["path"],
|
|
66
|
-
"additionalProperties": false
|
|
67
77
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
},
|
|
79
|
+
"name": {
|
|
80
|
+
"description": "Glob the class name must match, e.g. \"*Service\". An anonymous default export is named after its file.",
|
|
81
|
+
"type": "string",
|
|
82
|
+
"minLength": 1
|
|
83
|
+
},
|
|
84
|
+
"excludeClasses": {
|
|
85
|
+
"description": "Class names to drop after selection, e.g. one test double sitting next to the real registration in the same file.",
|
|
86
|
+
"type": "array",
|
|
87
|
+
"items": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"minLength": 1
|
|
90
|
+
},
|
|
91
|
+
"minItems": 1
|
|
92
|
+
},
|
|
93
|
+
"excludeName": {
|
|
94
|
+
"description": "Glob the class name must NOT match, e.g. \"*Mock\". An anonymous default export is named after its file.",
|
|
95
|
+
"type": "string",
|
|
96
|
+
"minLength": 1
|
|
97
|
+
}
|
|
77
98
|
},
|
|
78
|
-
"
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"description": "Which classes of a scanned file are registered. A class is selected when it is exported, not abstract, and meets every criterion set here; by default that is every exported class decorated with @register."
|
|
79
101
|
},
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"**/*.test.tsx",
|
|
86
|
-
"**/__tests__/**",
|
|
87
|
-
"**/node_modules/**"
|
|
88
|
-
],
|
|
89
|
-
"description": "Globs of files never read. Replaces the default when given. A non-empty list that omits a default glob makes `tic build` warn.",
|
|
90
|
-
"type": "array",
|
|
91
|
-
"items": {
|
|
92
|
-
"type": "string",
|
|
93
|
-
"minLength": 1
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
"additionalProperties": false,
|
|
98
|
-
"description": "Which files this bundle reads and parses — decided by path alone, before parsing. The candidates are what the extended tsconfig compiles, or the folders in `paths` when given. A candidate is parsed when it matches one of `include` and none of `exclude`. Globs are relative to this file. With a file naming convention, `include` keeps every other file unread."
|
|
99
|
-
},
|
|
100
|
-
"classes": {
|
|
101
|
-
"type": "object",
|
|
102
|
-
"properties": {
|
|
103
|
-
"export": {
|
|
104
|
-
"default": "any",
|
|
105
|
-
"description": "Which exports count.",
|
|
106
|
-
"type": "string",
|
|
107
|
-
"enum": ["any", "named", "default"]
|
|
108
|
-
},
|
|
109
|
-
"decorators": {
|
|
110
|
-
"default": ["register"],
|
|
111
|
-
"description": "The class must carry one of these decorators, recognised by name (e.g. \"register\", or a composed decorator). Default [\"register\"]; [] requires none.",
|
|
112
|
-
"type": "array",
|
|
113
|
-
"items": {
|
|
114
|
-
"type": "string",
|
|
115
|
-
"minLength": 1
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"name": {
|
|
119
|
-
"description": "Glob the class name must match, e.g. \"*Service\". An anonymous default export is named after its file.",
|
|
120
|
-
"type": "string",
|
|
121
|
-
"minLength": 1
|
|
122
|
-
},
|
|
123
|
-
"excludeClasses": {
|
|
124
|
-
"description": "Class names to drop after selection, e.g. one test double sitting next to the real registration in the same file.",
|
|
125
|
-
"type": "array",
|
|
126
|
-
"items": {
|
|
127
|
-
"type": "string",
|
|
128
|
-
"minLength": 1
|
|
102
|
+
"paths": {
|
|
103
|
+
"description": "tsconfig `paths`: aliases the generated imports are written in.",
|
|
104
|
+
"type": "object",
|
|
105
|
+
"propertyNames": {
|
|
106
|
+
"type": "string"
|
|
129
107
|
},
|
|
130
|
-
"
|
|
108
|
+
"additionalProperties": {
|
|
109
|
+
"type": "array",
|
|
110
|
+
"items": {
|
|
111
|
+
"type": "string"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
131
114
|
},
|
|
132
|
-
"
|
|
133
|
-
"description": "
|
|
134
|
-
"type": "string"
|
|
135
|
-
"minLength": 1
|
|
115
|
+
"rootDir": {
|
|
116
|
+
"description": "tsconfig `rootDir`: where the default output (<rootDir>/<name>.bundle.ts) goes.",
|
|
117
|
+
"type": "string"
|
|
136
118
|
}
|
|
137
119
|
},
|
|
138
|
-
"additionalProperties":
|
|
139
|
-
"description": "
|
|
120
|
+
"additionalProperties": {},
|
|
121
|
+
"description": "tsconfig `compilerOptions`, plus the bundler's own `importExtension` and `classes`. Every other option is handed to TypeScript on top of the extended tsconfig's, which validates it."
|
|
140
122
|
}
|
|
141
123
|
},
|
|
142
124
|
"additionalProperties": false
|
package/tpl/index.cjs
CHANGED
|
@@ -1,27 +1,7 @@
|
|
|
1
1
|
var Handlebars = require("handlebars"); var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
|
2
2
|
templates["Bundle.ts.hbs"] = template({"0":function(container,depth0,helpers,partials,data) {
|
|
3
|
-
var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
4
|
-
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
5
|
-
return parent[propertyName];
|
|
6
|
-
}
|
|
7
|
-
return undefined
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
return "// Paths: "
|
|
11
|
-
+ ((stack1 = (lookupProperty(helpers,"join")||(depth0 && lookupProperty(depth0,"join"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"paths") : depth0),", ",{"name":"join","hash":{},"data":data,"loc":{"start":{"line":2,"column":23},"end":{"line":2,"column":44}}})) != null ? stack1 : "");
|
|
12
|
-
},"1":function(container,depth0,helpers,partials,data) {
|
|
13
|
-
var stack1, helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
14
|
-
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
15
|
-
return parent[propertyName];
|
|
16
|
-
}
|
|
17
|
-
return undefined
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
return "// Files: as compiled by "
|
|
21
|
-
+ ((stack1 = ((helper = (helper = lookupProperty(helpers,"tsconfigPath") || (depth0 != null ? lookupProperty(depth0,"tsconfigPath") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"tsconfigPath","hash":{},"data":data,"loc":{"start":{"line":2,"column":77},"end":{"line":2,"column":95}}}) : helper))) != null ? stack1 : "");
|
|
22
|
-
},"2":function(container,depth0,helpers,partials,data) {
|
|
23
3
|
return ", Registration";
|
|
24
|
-
},"
|
|
4
|
+
},"1":function(container,depth0,helpers,partials,data) {
|
|
25
5
|
var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
26
6
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
27
7
|
return parent[propertyName];
|
|
@@ -30,12 +10,12 @@ templates["Bundle.ts.hbs"] = template({"0":function(container,depth0,helpers,par
|
|
|
30
10
|
};
|
|
31
11
|
|
|
32
12
|
return "import "
|
|
33
|
-
+ ((stack1 = lookupProperty(helpers,"if").call(alias1,(depth0 != null ? lookupProperty(depth0,"defaultName") : depth0),{"name":"if","hash":{},"fn":container.program(
|
|
34
|
-
+ ((stack1 = lookupProperty(helpers,"if").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"named") : depth0)) != null ? lookupProperty(stack1,"length") : stack1),{"name":"if","hash":{},"fn":container.program(
|
|
13
|
+
+ ((stack1 = lookupProperty(helpers,"if").call(alias1,(depth0 != null ? lookupProperty(depth0,"defaultName") : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":4,"column":7},"end":{"line":4,"column":79}}})) != null ? stack1 : "")
|
|
14
|
+
+ ((stack1 = lookupProperty(helpers,"if").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"named") : depth0)) != null ? lookupProperty(stack1,"length") : stack1),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":4,"column":79},"end":{"line":4,"column":131}}})) != null ? stack1 : "")
|
|
35
15
|
+ " from '"
|
|
36
|
-
+ ((stack1 = ((helper = (helper = lookupProperty(helpers,"specifier") || (depth0 != null ? lookupProperty(depth0,"specifier") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"specifier","hash":{},"data":data,"loc":{"start":{"line":
|
|
16
|
+
+ ((stack1 = ((helper = (helper = lookupProperty(helpers,"specifier") || (depth0 != null ? lookupProperty(depth0,"specifier") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"specifier","hash":{},"data":data,"loc":{"start":{"line":4,"column":138},"end":{"line":4,"column":153}}}) : helper))) != null ? stack1 : "")
|
|
37
17
|
+ "';\n";
|
|
38
|
-
},"
|
|
18
|
+
},"2":function(container,depth0,helpers,partials,data) {
|
|
39
19
|
var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
40
20
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
41
21
|
return parent[propertyName];
|
|
@@ -43,11 +23,11 @@ templates["Bundle.ts.hbs"] = template({"0":function(container,depth0,helpers,par
|
|
|
43
23
|
return undefined
|
|
44
24
|
};
|
|
45
25
|
|
|
46
|
-
return ((stack1 = ((helper = (helper = lookupProperty(helpers,"defaultName") || (depth0 != null ? lookupProperty(depth0,"defaultName") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"defaultName","hash":{},"data":data,"loc":{"start":{"line":
|
|
47
|
-
+ ((stack1 = lookupProperty(helpers,"if").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"named") : depth0)) != null ? lookupProperty(stack1,"length") : stack1),{"name":"if","hash":{},"fn":container.program(
|
|
48
|
-
},"
|
|
26
|
+
return ((stack1 = ((helper = (helper = lookupProperty(helpers,"defaultName") || (depth0 != null ? lookupProperty(depth0,"defaultName") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"defaultName","hash":{},"data":data,"loc":{"start":{"line":4,"column":26},"end":{"line":4,"column":43}}}) : helper))) != null ? stack1 : "")
|
|
27
|
+
+ ((stack1 = lookupProperty(helpers,"if").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"named") : depth0)) != null ? lookupProperty(stack1,"length") : stack1),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":4,"column":43},"end":{"line":4,"column":72}}})) != null ? stack1 : "");
|
|
28
|
+
},"3":function(container,depth0,helpers,partials,data) {
|
|
49
29
|
return ", ";
|
|
50
|
-
},"
|
|
30
|
+
},"4":function(container,depth0,helpers,partials,data) {
|
|
51
31
|
var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
52
32
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
53
33
|
return parent[propertyName];
|
|
@@ -56,9 +36,9 @@ templates["Bundle.ts.hbs"] = template({"0":function(container,depth0,helpers,par
|
|
|
56
36
|
};
|
|
57
37
|
|
|
58
38
|
return "{ "
|
|
59
|
-
+ ((stack1 = (lookupProperty(helpers,"join")||(depth0 && lookupProperty(depth0,"join"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"named") : depth0),", ",{"name":"join","hash":{},"data":data,"loc":{"start":{"line":
|
|
39
|
+
+ ((stack1 = (lookupProperty(helpers,"join")||(depth0 && lookupProperty(depth0,"join"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"named") : depth0),", ",{"name":"join","hash":{},"data":data,"loc":{"start":{"line":4,"column":101},"end":{"line":4,"column":122}}})) != null ? stack1 : "")
|
|
60
40
|
+ " }";
|
|
61
|
-
},"
|
|
41
|
+
},"5":function(container,depth0,helpers,partials,data) {
|
|
62
42
|
var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
63
43
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
64
44
|
return parent[propertyName];
|
|
@@ -67,15 +47,15 @@ templates["Bundle.ts.hbs"] = template({"0":function(container,depth0,helpers,par
|
|
|
67
47
|
};
|
|
68
48
|
|
|
69
49
|
return "export const registrations: IRegistration[] = [\n"
|
|
70
|
-
+ ((stack1 = lookupProperty(helpers,"each").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"registrations") : depth0),{"name":"each","hash":{},"fn":container.program(
|
|
50
|
+
+ ((stack1 = lookupProperty(helpers,"each").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"registrations") : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":9,"column":0},"end":{"line":11,"column":9}}})) != null ? stack1 : "")
|
|
71
51
|
+ "];\n";
|
|
72
|
-
},"
|
|
52
|
+
},"6":function(container,depth0,helpers,partials,data) {
|
|
73
53
|
var stack1;
|
|
74
54
|
|
|
75
55
|
return " Registration.fromClass("
|
|
76
56
|
+ ((stack1 = container.lambda(depth0, depth0)) != null ? stack1 : "")
|
|
77
57
|
+ "),\n";
|
|
78
|
-
},"
|
|
58
|
+
},"7":function(container,depth0,helpers,partials,data) {
|
|
79
59
|
return "export const registrations: IRegistration[] = [];\n";
|
|
80
60
|
},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
|
|
81
61
|
var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
@@ -87,15 +67,13 @@ templates["Bundle.ts.hbs"] = template({"0":function(container,depth0,helpers,par
|
|
|
87
67
|
|
|
88
68
|
return "// Generated by `tic build` from "
|
|
89
69
|
+ ((stack1 = ((helper = (helper = lookupProperty(helpers,"configPath") || (depth0 != null ? lookupProperty(depth0,"configPath") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"configPath","hash":{},"data":data,"loc":{"start":{"line":1,"column":33},"end":{"line":1,"column":49}}}) : helper))) != null ? stack1 : "")
|
|
90
|
-
+ ". Do not edit by hand.\
|
|
91
|
-
+ ((stack1 = lookupProperty(helpers,"if").call(alias1,(depth0 != null ? lookupProperty(depth0,"
|
|
92
|
-
+ "\nimport { type IContainer, type IContainerModule, type IRegistration"
|
|
93
|
-
+ ((stack1 = lookupProperty(helpers,"if").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"registrations") : depth0)) != null ? lookupProperty(stack1,"length") : stack1),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":3,"column":67},"end":{"line":3,"column":116}}})) != null ? stack1 : "")
|
|
70
|
+
+ ". Do not edit by hand.\nimport { type IContainer, type IContainerModule, type IRegistration"
|
|
71
|
+
+ ((stack1 = lookupProperty(helpers,"if").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"registrations") : depth0)) != null ? lookupProperty(stack1,"length") : stack1),{"name":"if","hash":{},"fn":container.program(0, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":2,"column":67},"end":{"line":2,"column":116}}})) != null ? stack1 : "")
|
|
94
72
|
+ " } from 'ts-ioc-container';\n"
|
|
95
|
-
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"imports") : depth0),{"name":"each","hash":{},"fn":container.program(
|
|
73
|
+
+ ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"imports") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":3,"column":0},"end":{"line":5,"column":9}}})) != null ? stack1 : "")
|
|
96
74
|
+ "\n"
|
|
97
|
-
+ ((stack1 = lookupProperty(helpers,"if").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"registrations") : depth0)) != null ? lookupProperty(stack1,"length") : stack1),{"name":"if","hash":{},"fn":container.program(
|
|
75
|
+
+ ((stack1 = lookupProperty(helpers,"if").call(alias1,((stack1 = (depth0 != null ? lookupProperty(depth0,"registrations") : depth0)) != null ? lookupProperty(stack1,"length") : stack1),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data,"loc":{"start":{"line":7,"column":0},"end":{"line":15,"column":7}}})) != null ? stack1 : "")
|
|
98
76
|
+ "\nexport class "
|
|
99
|
-
+ ((stack1 = ((helper = (helper = lookupProperty(helpers,"name") || (depth0 != null ? lookupProperty(depth0,"name") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data,"loc":{"start":{"line":
|
|
77
|
+
+ ((stack1 = ((helper = (helper = lookupProperty(helpers,"name") || (depth0 != null ? lookupProperty(depth0,"name") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data,"loc":{"start":{"line":17,"column":13},"end":{"line":17,"column":23}}}) : helper))) != null ? stack1 : "")
|
|
100
78
|
+ " implements IContainerModule {\n applyTo(container: IContainer): void {\n for (const registration of registrations) container.addRegistration(registration);\n }\n}\n";
|
|
101
79
|
},"useData":true});
|
package/typings/app.d.ts
CHANGED
|
@@ -11,8 +11,7 @@ export declare function run(argv: string[], io?: CliIo): number;
|
|
|
11
11
|
* Generates the bundle a config describes — one `tic build` step as a function. Nothing is
|
|
12
12
|
* written unless generation succeeds.
|
|
13
13
|
*
|
|
14
|
-
* @throws {TicConfigError} when the config or
|
|
15
|
-
* @throws {NamespaceNotFoundError} when a path is neither a folder nor a tsconfig paths alias of one.
|
|
14
|
+
* @throws {TicConfigError} when the config or the tsconfig it extends is missing or invalid.
|
|
16
15
|
*/
|
|
17
16
|
export declare function build({ cwd, ...request }?: BuildOptions): BuildResult;
|
|
18
17
|
/**
|
|
@@ -10,10 +10,6 @@ export declare abstract class TicError extends Error {
|
|
|
10
10
|
export declare class TicConfigError extends TicError {
|
|
11
11
|
constructor(message: string);
|
|
12
12
|
}
|
|
13
|
-
/** A namespace is neither an existing folder nor a `tsconfig.json` `paths` alias of one. */
|
|
14
|
-
export declare class NamespaceNotFoundError extends TicError {
|
|
15
|
-
constructor(message: string);
|
|
16
|
-
}
|
|
17
13
|
/** The command line names no command. */
|
|
18
14
|
export declare class MissingCommandError extends TicError {
|
|
19
15
|
constructor(usage: string);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainException.d.ts","sourceRoot":"","sources":["../../lib/exceptions/DomainException.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,8BAAsB,QAAS,SAAQ,KAAK;IAExC,QAAQ,CAAC,IAAI,EAAE,MAAM;IADvB,SAAS,aACE,IAAI,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM;CAKlB;AAED,8FAA8F;AAC9F,qBAAa,cAAe,SAAQ,QAAQ;gBAC9B,OAAO,EAAE,MAAM;CAG5B;AAED,
|
|
1
|
+
{"version":3,"file":"DomainException.d.ts","sourceRoot":"","sources":["../../lib/exceptions/DomainException.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,8BAAsB,QAAS,SAAQ,KAAK;IAExC,QAAQ,CAAC,IAAI,EAAE,MAAM;IADvB,SAAS,aACE,IAAI,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM;CAKlB;AAED,8FAA8F;AAC9F,qBAAa,cAAe,SAAQ,QAAQ;gBAC9B,OAAO,EAAE,MAAM;CAG5B;AAED,yCAAyC;AACzC,qBAAa,mBAAoB,SAAQ,QAAQ;gBACnC,KAAK,EAAE,MAAM;CAG1B;AAED,wEAAwE;AACxE,qBAAa,mBAAoB,SAAQ,QAAQ;gBACnC,OAAO,EAAE,MAAM;CAG5B;AAED,kFAAkF;AAClF,qBAAa,kBAAmB,SAAQ,QAAQ;gBAClC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAG5C;AAED,uFAAuF;AACvF,qBAAa,UAAW,SAAQ,QAAQ;gBAC1B,OAAO,EAAE,MAAM;CAG5B;AAED,6FAA6F;AAC7F,qBAAa,iBAAkB,SAAQ,QAAQ;gBACjC,KAAK,EAAE,MAAM;CAG1B"}
|