@quadnix/octo-build 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -21
- package/dist/commands/apply/apply.command.js +32 -38
- package/dist/commands/apply/apply.command.js.map +1 -1
- package/dist/commands/commit/commit.command.d.ts +4 -3
- package/dist/commands/commit/commit.command.js +31 -44
- package/dist/commands/commit/commit.command.js.map +1 -1
- package/dist/commands/create-app/generator-octo-app-template/generators/app/index.js +15 -6
- package/dist/commands/create-app/generator-octo-app-template/generators/app/index.js.map +1 -1
- package/dist/commands/create-app/generator-octo-app-template/generators/app/templates/README.md.ejs +25 -16
- package/dist/commands/create-app/generator-octo-app-template/generators/app/templates/gitignore.ejs +3 -2
- package/dist/commands/create-app/generator-octo-app-template/generators/app/templates/src/aws-dynamodb-service/octo.yaml.ejs +1 -1
- package/dist/commands/create-app/generator-octo-app-template/generators/app/templates/src/aws-ecs-server/octo.yaml.ejs +14 -16
- package/dist/commands/create-app/generator-octo-app-template/generators/app/templates/src/aws-s3-website/octo.yaml.ejs +11 -3
- package/dist/commands/create-model/generator-octo-model-template/generators/app/templates/models/model/model.ts.ejs +38 -0
- package/dist/commands/generate/generate.command.d.ts +3 -1
- package/dist/commands/generate/generate.command.js +12 -12
- package/dist/commands/generate/generate.command.js.map +1 -1
- package/dist/commands/get-response/get-response.command.js +3 -3
- package/dist/commands/get-response/get-response.command.js.map +1 -1
- package/dist/commands/lock/lock.command.d.ts +8 -3
- package/dist/commands/lock/lock.command.js +16 -13
- package/dist/commands/lock/lock.command.js.map +1 -1
- package/dist/commands/run-action/run-action.command.js +4 -10
- package/dist/commands/run-action/run-action.command.js.map +1 -1
- package/dist/commands/unlock/unlock.command.d.ts +5 -5
- package/dist/commands/unlock/unlock.command.js +15 -31
- package/dist/commands/unlock/unlock.command.js.map +1 -1
- package/dist/commands/validate/validate.command.d.ts +1 -1
- package/dist/commands/validate/validate.command.js +9 -15
- package/dist/commands/validate/validate.command.js.map +1 -1
- package/dist/resources/octo-v1.schema.json +25 -11
- package/dist/utilities/definition/yaml/yaml-definition.utility.d.ts +15 -13
- package/dist/utilities/definition/yaml/yaml-definition.utility.js +38 -22
- package/dist/utilities/definition/yaml/yaml-definition.utility.js.map +1 -1
- package/dist/utilities/octo/octo.utility.d.ts +62 -45
- package/dist/utilities/octo/octo.utility.js +162 -128
- package/dist/utilities/octo/octo.utility.js.map +1 -1
- package/package.json +5 -3
|
@@ -1,144 +1,178 @@
|
|
|
1
1
|
import { existsSync } from 'fs';
|
|
2
2
|
import { delimiter, dirname, resolve } from 'path';
|
|
3
|
-
import { Container, Octo, StateManagementService } from '@quadnix/octo';
|
|
3
|
+
import { CommandFailedEvent, CommandFinishedEvent, CommandStartedEvent, Container, Octo, StateManagementService, } from '@quadnix/octo';
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
import { YamlDefinitionUtility } from '../definition/yaml/yaml-definition.utility.js';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* @throws If the variable is unset, or names a file that does not exist.
|
|
7
|
+
* Boots octo the way every lifecycle command does, from the definition file `OCTO_DEFINITION_FILE_PATH`
|
|
8
|
+
* names, and reports what went wrong when a command fails.
|
|
10
9
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* It does not disable listeners — it routes them to stderr, so that the SDK resource-action path,
|
|
41
|
-
* the only place resource actions actually execute, stays observable.
|
|
42
|
-
*/
|
|
43
|
-
export async function bootOcto({ quietStdout = false } = {}) {
|
|
44
|
-
const definition = new YamlDefinitionUtility(resolveDefinitionFilePath());
|
|
45
|
-
const hooks = await definition.resolveHooks();
|
|
46
|
-
const imports = await definition.resolveImports();
|
|
47
|
-
const listeners = await definition.resolveListeners({ logDestination: quietStdout ? 'stderr' : 'stdout' });
|
|
48
|
-
const modules = definition.resolveModules(imports);
|
|
49
|
-
const stateProvider = definition.resolveStateProvider();
|
|
50
|
-
const tags = definition.resolveTags();
|
|
51
|
-
const terraformOptions = definition.resolveTerraformOptions();
|
|
52
|
-
if (!quietStdout) {
|
|
53
|
-
console.log(chalk.green('Definition file is valid and all modules were successfully imported.'));
|
|
54
|
-
}
|
|
55
|
-
// Initialize.
|
|
56
|
-
const octo = new Octo();
|
|
57
|
-
await octo.initialize(stateProvider.type, listeners.map((l) => ({
|
|
58
|
-
options: {
|
|
59
|
-
args: l.args,
|
|
60
|
-
metadata: l.metadata,
|
|
61
|
-
},
|
|
62
|
-
type: l.type,
|
|
63
|
-
})));
|
|
64
|
-
// Register hooks.
|
|
65
|
-
octo.registerHooks(hooks);
|
|
66
|
-
// Register terraform config + providers.
|
|
67
|
-
octo.registerTerraformConfig({
|
|
68
|
-
minTerraformVersion: terraformOptions.requiredVersion,
|
|
69
|
-
providers: terraformOptions.requiredProviders,
|
|
70
|
-
});
|
|
71
|
-
for (const provider of terraformOptions.providers) {
|
|
72
|
-
octo.registerTerraformProvider(provider.providerType, provider.accountId, provider.regionId, provider.spec, {
|
|
73
|
-
accountName: provider.accountName,
|
|
74
|
-
setRegionAttribute: provider.setRegionAttribute,
|
|
10
|
+
export class OctoUtility {
|
|
11
|
+
/**
|
|
12
|
+
* Boots octo with every listener, hook, module and terraform provider the definition lists, and
|
|
13
|
+
* composes the app. Prints nothing, so stdout carries only the command's own output.
|
|
14
|
+
*/
|
|
15
|
+
static async bootOcto() {
|
|
16
|
+
const definition = new YamlDefinitionUtility(OctoUtility.resolveDefinitionFilePath());
|
|
17
|
+
const hooks = await definition.resolveHooks();
|
|
18
|
+
const imports = await definition.resolveImports();
|
|
19
|
+
const listeners = await definition.resolveListeners();
|
|
20
|
+
const modules = definition.resolveModules(imports);
|
|
21
|
+
const stateProvider = definition.resolveStateProvider();
|
|
22
|
+
const tags = definition.resolveTags();
|
|
23
|
+
const terraformOptions = definition.resolveTerraformOptions();
|
|
24
|
+
// Initialize.
|
|
25
|
+
const octo = new Octo();
|
|
26
|
+
await octo.initialize(stateProvider.type, listeners.map((l) => ({
|
|
27
|
+
options: {
|
|
28
|
+
args: l.args,
|
|
29
|
+
metadata: l.metadata,
|
|
30
|
+
},
|
|
31
|
+
type: l.type,
|
|
32
|
+
})));
|
|
33
|
+
// Register hooks.
|
|
34
|
+
octo.registerHooks(hooks);
|
|
35
|
+
// Register terraform config + providers.
|
|
36
|
+
octo.registerTerraformConfig({
|
|
37
|
+
minTerraformVersion: terraformOptions.requiredVersion,
|
|
38
|
+
providers: terraformOptions.requiredProviders,
|
|
75
39
|
});
|
|
40
|
+
for (const provider of terraformOptions.providers) {
|
|
41
|
+
octo.registerTerraformProvider(provider.providerType, provider.accountId, provider.regionId, provider.spec, {
|
|
42
|
+
accountName: provider.accountName,
|
|
43
|
+
setRegionAttribute: provider.setRegionAttribute,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
// Load modules.
|
|
47
|
+
for (const moduleDefinition of modules) {
|
|
48
|
+
octo.loadModule(moduleDefinition.moduleClass, moduleDefinition.moduleId, moduleDefinition.moduleInputs);
|
|
49
|
+
}
|
|
50
|
+
octo.orderModules(modules.map((m) => m.moduleClass));
|
|
51
|
+
// Compose.
|
|
52
|
+
await octo.compose();
|
|
53
|
+
const app = octo.getRootModel();
|
|
54
|
+
// Register tags. A module-scoped tag names a module that only exists once compose has run it.
|
|
55
|
+
octo.registerTags(tags);
|
|
56
|
+
return { app, octo };
|
|
76
57
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Boots only the state provider the definition names, without loading a single module, and returns
|
|
60
|
+
* how often terraform state is checked into it during a terraform command. Loads every listener the definition lists.
|
|
61
|
+
*
|
|
62
|
+
* `apply` is a terraform action rather than an octo mode, so it has no reason to compose a model
|
|
63
|
+
* graph - but terraform state is checked out of the state provider and back into it around every
|
|
64
|
+
* terraform command, so the provider still has to be there, and terraform's output reaches the
|
|
65
|
+
* terminal only through the listeners.
|
|
66
|
+
*/
|
|
67
|
+
static async bootStateProvider() {
|
|
68
|
+
const definition = new YamlDefinitionUtility(OctoUtility.resolveDefinitionFilePath());
|
|
69
|
+
const stateProvider = definition.resolveStateProvider();
|
|
70
|
+
await Container.getInstance().get(StateManagementService, {
|
|
71
|
+
args: [stateProvider.type],
|
|
72
|
+
});
|
|
73
|
+
for (const listener of await definition.resolveListeners()) {
|
|
74
|
+
await Container.getInstance().get(listener.type, {
|
|
75
|
+
args: listener.args,
|
|
76
|
+
metadata: listener.metadata,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return { stateCheckInIntervalInMs: definition.resolveStateCheckInIntervalInMs() };
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
export function prepareCallbackEnvironment() {
|
|
110
|
-
const definitionFilePath = process.env.OCTO_DEFINITION_FILE_PATH;
|
|
111
|
-
if (definitionFilePath) {
|
|
112
|
-
process.env.OCTO_DEFINITION_FILE_PATH = resolve(process.cwd(), definitionFilePath);
|
|
81
|
+
/**
|
|
82
|
+
* Makes the environment survive the trip into terraform's `local-exec`.
|
|
83
|
+
*
|
|
84
|
+
* An external resource shells back out to `octo` from the terraform that terragrunt runs -
|
|
85
|
+
* `run-action` from its `local-exec` provisioner, `get-response` from its `data "external"` - and
|
|
86
|
+
* those commands inherit this process's environment. Two things about it are wrong by default, and
|
|
87
|
+
* both fail only after real infrastructure exists:
|
|
88
|
+
*
|
|
89
|
+
* - **`octo` is a bare binary name**, resolved through `PATH`. Invoking a binary by path -
|
|
90
|
+
* `node_modules/.bin/octo apply` - does not put its directory on `PATH` for child processes, so
|
|
91
|
+
* the callback dies with `octo: command not found`. The generated app runs the flow through
|
|
92
|
+
* package scripts, and `npm run` does put that directory on `PATH`, but running the binary
|
|
93
|
+
* directly is still supported and has to work the same. The project's bin directory is prepended
|
|
94
|
+
* here, and the directory this CLI is running from after it, so a globally installed or linked
|
|
95
|
+
* octo still wins over nothing at all.
|
|
96
|
+
* - **`OCTO_DEFINITION_FILE_PATH` is usually relative** (`octo.yaml` - the package scripts set
|
|
97
|
+
* exactly that), and terraform runs `local-exec` with a terragrunt cache directory as its cwd,
|
|
98
|
+
* where that resolves to nothing. It is made absolute here, against the cwd the user actually
|
|
99
|
+
* invoked from.
|
|
100
|
+
*/
|
|
101
|
+
static prepareCallbackEnvironment() {
|
|
102
|
+
const definitionFilePath = process.env.OCTO_DEFINITION_FILE_PATH;
|
|
103
|
+
if (definitionFilePath) {
|
|
104
|
+
process.env.OCTO_DEFINITION_FILE_PATH = resolve(process.cwd(), definitionFilePath);
|
|
105
|
+
}
|
|
106
|
+
const binDirectories = [resolve(process.cwd(), 'node_modules', '.bin'), dirname(process.argv[1] ?? '')].filter((directory) => directory && existsSync(directory));
|
|
107
|
+
const pathEntries = (process.env.PATH ?? '').split(delimiter).filter(Boolean);
|
|
108
|
+
process.env.PATH = [...binDirectories.filter((d) => !pathEntries.includes(d)), ...pathEntries].join(delimiter);
|
|
113
109
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
110
|
+
/**
|
|
111
|
+
* Prints an octo error to stderr, including the properties it carries - the diff that matched no
|
|
112
|
+
* action, most of all - which a bare stack trace would hide.
|
|
113
|
+
*/
|
|
114
|
+
static reportError(error) {
|
|
115
|
+
console.error(chalk.red(error.stack));
|
|
116
|
+
for (const errorProperty of Object.getOwnPropertyNames(error) || []) {
|
|
117
|
+
if (errorProperty !== 'message' && errorProperty !== 'stack') {
|
|
118
|
+
// Serialized rather than interpolated: the properties worth attaching to an octo error are
|
|
119
|
+
// objects - the diff that matched no action, most of all - and `${}` renders those as
|
|
120
|
+
// "[object Object]", which hides the only thing that would identify the node and field.
|
|
121
|
+
const value = error[errorProperty];
|
|
122
|
+
const renderedValue = value !== null && typeof value === 'object' ? JSON.stringify(value, undefined, 2) : String(value);
|
|
123
|
+
console.error(chalk.red(`${errorProperty}: ${renderedValue}`));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const failures = error.failures || [];
|
|
127
|
+
if (failures.length > 0) {
|
|
128
|
+
console.error('\n');
|
|
129
|
+
console.error(chalk.red('FAILURES'));
|
|
130
|
+
console.error(chalk.red('========'));
|
|
131
|
+
}
|
|
132
|
+
for (let i = 0; i < failures.length; i++) {
|
|
133
|
+
console.error(chalk.red(`${i + 1}. ${failures[i]}`));
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
/**
|
|
137
|
+
* Runs one lifecycle command: announces it, runs `body`, and exits with 1 after reporting what it
|
|
138
|
+
* threw. The command's end is announced, and awaited by listeners such as the journal, before the
|
|
139
|
+
* process exits.
|
|
140
|
+
*/
|
|
141
|
+
static async runCommand(command, body) {
|
|
142
|
+
const eventService = (await Container.getInstance().get('EventService'));
|
|
143
|
+
const startedAt = Date.now();
|
|
144
|
+
eventService.emit(new CommandStartedEvent(undefined, { command }));
|
|
145
|
+
// Run the command, announcing how it ended.
|
|
146
|
+
try {
|
|
147
|
+
await body();
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
await eventService.emitAndWait(new CommandFailedEvent(undefined, {
|
|
151
|
+
command,
|
|
152
|
+
durationInMs: Date.now() - startedAt,
|
|
153
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
154
|
+
}));
|
|
155
|
+
OctoUtility.reportError(error);
|
|
156
|
+
process.exit(1);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
await eventService.emitAndWait(new CommandFinishedEvent(undefined, { command, durationInMs: Date.now() - startedAt }));
|
|
139
160
|
}
|
|
140
|
-
|
|
141
|
-
|
|
161
|
+
/**
|
|
162
|
+
* The absolute path of the definition file, from `OCTO_DEFINITION_FILE_PATH`.
|
|
163
|
+
*
|
|
164
|
+
* @throws If the variable is unset, or names a file that does not exist.
|
|
165
|
+
*/
|
|
166
|
+
static resolveDefinitionFilePath() {
|
|
167
|
+
const fromEnv = process.env.OCTO_DEFINITION_FILE_PATH;
|
|
168
|
+
if (!fromEnv) {
|
|
169
|
+
throw new Error(`Environment variable "OCTO_DEFINITION_FILE_PATH" is not set! Set it to the path of your Octo definition YAML file.`);
|
|
170
|
+
}
|
|
171
|
+
const definitionFilePath = resolve(process.cwd(), fromEnv);
|
|
172
|
+
if (!existsSync(definitionFilePath)) {
|
|
173
|
+
throw new Error(`Octo definition file not found at "${definitionFilePath}"!`);
|
|
174
|
+
}
|
|
175
|
+
return definitionFilePath;
|
|
142
176
|
}
|
|
143
177
|
}
|
|
144
178
|
//# sourceMappingURL=octo.utility.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"octo.utility.js","sourceRoot":"","sources":["../../../src/utilities/octo/octo.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"octo.utility.js","sourceRoot":"","sources":["../../../src/utilities/octo/octo.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,EAEL,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,SAAS,EAET,IAAI,EACJ,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF;;;GAGG;AACH,MAAM,OAAO,WAAW;IACtB;;;OAGG;IACH,MAAM,CAAC,KAAK,CAAC,QAAQ;QAInB,MAAM,UAAU,GAAG,IAAI,qBAAqB,CAAC,WAAW,CAAC,yBAAyB,EAAE,CAAC,CAAC;QAEtF,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC,YAAY,EAAE,CAAC;QAC9C,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC,cAAc,EAAE,CAAC;QAClD,MAAM,SAAS,GAAG,MAAM,UAAU,CAAC,gBAAgB,EAAE,CAAC;QACtD,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,aAAa,GAAG,UAAU,CAAC,oBAAoB,EAAE,CAAC;QACxD,MAAM,IAAI,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;QACtC,MAAM,gBAAgB,GAAG,UAAU,CAAC,uBAAuB,EAAE,CAAC;QAE9D,cAAc;QACd,MAAM,IAAI,GAAG,IAA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AK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;aACjE,CAAC,CACH,CAAC;YACF,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAC/B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,YAAY,CAAC,WAAW,CAC5B,IAAI,oBAAoB,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,CAAC,CACvF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACK,MAAM,CAAC,yBAAyB;QACtC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC;QACtD,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CACb,oHAAoH,CACrH,CAAC;QACJ,CAAC;QAED,MAAM,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC;QAC3D,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,sCAAsC,kBAAkB,IAAI,CAAC,CAAC;QAChF,CAAC;QAED,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"url": "https://github.com/quadnix/octo/issues"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@quadnix/octo": "~0.
|
|
10
|
-
"@quadnix/octo-event-listeners": "~0.
|
|
9
|
+
"@quadnix/octo": "~0.2.0",
|
|
10
|
+
"@quadnix/octo-event-listeners": "~0.2.0",
|
|
11
11
|
"ajv": "~8.17.1",
|
|
12
12
|
"chalk": "~5.5.0",
|
|
13
13
|
"js-yaml": "~4.1.0",
|
|
@@ -80,12 +80,14 @@
|
|
|
80
80
|
},
|
|
81
81
|
"type": "module",
|
|
82
82
|
"types": "./dist/index.d.ts",
|
|
83
|
-
"version": "0.
|
|
83
|
+
"version": "0.2.0",
|
|
84
84
|
"scripts": {
|
|
85
85
|
"build": "rimraf dist && tsc -p tsconfig.build.json && pnpm run copy-assets && chmod +x ./dist/index.js",
|
|
86
86
|
"check:circular-dependency": "dpdm --no-tree --exit-code circular:1 --no-warning ./dist/index.js",
|
|
87
|
+
"check:types": "tsc --noEmit -p tsconfig.json",
|
|
87
88
|
"copy-assets": "copyfiles -u 1 \"src/**/*.{ejs,json}\" dist/",
|
|
88
89
|
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
90
|
+
"format:check": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
89
91
|
"lint": "eslint .",
|
|
90
92
|
"lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
|
91
93
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest --testRegex=\"\\.spec.ts$\"",
|