@atls/code-schematics 2.0.29 → 2.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/dist/exceptions/index.d.ts +1 -0
- package/dist/exceptions/index.js +1 -0
- package/dist/exceptions/schematic-workflow.d.ts +3 -0
- package/dist/exceptions/schematic-workflow.js +5 -0
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.js +1 -0
- package/dist/generated/raijin-schematic-export.d.ts +43 -0
- package/dist/generated/raijin-schematic-export.js +59 -0
- package/dist/generated/schematic-factory-export.d.ts +1 -1
- package/dist/generated/schematic-factory-export.js +1 -1
- package/dist/getters/index.d.ts +2 -2
- package/dist/getters/index.js +2 -2
- package/dist/getters/{stream-report-callback.getter.js → stream-report-callback.js} +7 -10
- package/dist/helpers/index.d.ts +5 -3
- package/dist/helpers/index.js +5 -3
- package/dist/helpers/raijin.d.ts +2 -0
- package/dist/helpers/raijin.js +6 -0
- package/dist/helpers/{run-schematics.helper.js → run-schematics.js} +1 -1
- package/dist/helpers/schematic-result.d.ts +1 -0
- package/dist/helpers/schematic-result.js +6 -0
- package/dist/helpers/{write-tmp-schematic.helper.d.ts → write-tmp-schematic.d.ts} +1 -1
- package/dist/helpers/{write-tmp-schematic.helper.js → write-tmp-schematic.js} +3 -3
- package/dist/schematic/project/{project.factory.js → factory.js} +1 -1
- package/dist/schematic/project/index.d.ts +1 -1
- package/dist/schematic/project/index.js +1 -1
- package/dist/schematic/rules/index.d.ts +1 -1
- package/dist/schematic/rules/index.js +1 -1
- package/dist/schematic/rules/tsconfig.update.d.ts +6 -0
- package/dist/schematic/rules/tsconfig.update.js +3 -0
- package/dist/scripts/exceptions/index.d.ts +1 -1
- package/dist/scripts/exceptions/index.js +1 -1
- package/dist/scripts/getters/{esbuild-config.getter.js → esbuild-config.js} +1 -1
- package/dist/scripts/getters/index.d.ts +4 -4
- package/dist/scripts/getters/index.js +4 -4
- package/dist/scripts/index.d.ts +1 -1
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/schematic-factory-build.js +15 -0
- package/dist/scripts/{schematic-smoke.script.js → schematic-smoke.js} +1 -1
- package/package.json +4 -4
- package/dist/schematic/rules/update-ts-config.rule.d.ts +0 -2
- package/dist/schematic/rules/update-ts-config.rule.js +0 -7
- package/dist/scripts/schematic-factory-build.script.js +0 -10
- /package/dist/getters/{stream-report-callback.getter.d.ts → stream-report-callback.d.ts} +0 -0
- /package/dist/getters/{stream-report-options.getter.d.ts → stream-report-options.d.ts} +0 -0
- /package/dist/getters/{stream-report-options.getter.js → stream-report-options.js} +0 -0
- /package/dist/helpers/{events-log.helper.d.ts → events-log.d.ts} +0 -0
- /package/dist/helpers/{events-log.helper.js → events-log.js} +0 -0
- /package/dist/helpers/{prepare-tmp-dir.helper.d.ts → prepare-tmp-dir.d.ts} +0 -0
- /package/dist/helpers/{prepare-tmp-dir.helper.js → prepare-tmp-dir.js} +0 -0
- /package/dist/helpers/{run-schematics.helper.d.ts → run-schematics.d.ts} +0 -0
- /package/dist/schematic/project/{project.factory.d.ts → factory.d.ts} +0 -0
- /package/dist/scripts/exceptions/{undefined-build-result.exception.d.ts → undefined-build-result.d.ts} +0 -0
- /package/dist/scripts/exceptions/{undefined-build-result.exception.js → undefined-build-result.js} +0 -0
- /package/dist/scripts/getters/{cjs-content.getter.d.ts → cjs-content.d.ts} +0 -0
- /package/dist/scripts/getters/{cjs-content.getter.js → cjs-content.js} +0 -0
- /package/dist/scripts/getters/{encoded-content.getter.d.ts → encoded-content.d.ts} +0 -0
- /package/dist/scripts/getters/{encoded-content.getter.js → encoded-content.js} +0 -0
- /package/dist/scripts/getters/{esbuild-config.getter.d.ts → esbuild-config.d.ts} +0 -0
- /package/dist/scripts/getters/{generated-file-content.getter.d.ts → generated-file-content.d.ts} +0 -0
- /package/dist/scripts/getters/{generated-file-content.getter.js → generated-file-content.js} +0 -0
- /package/dist/scripts/{schematic-build.script.d.ts → schematic-build.d.ts} +0 -0
- /package/dist/scripts/{schematic-build.script.js → schematic-build.js} +0 -0
- /package/dist/scripts/{schematic-factory-build.script.d.ts → schematic-factory-build.d.ts} +0 -0
- /package/dist/scripts/{schematic-smoke.script.d.ts → schematic-smoke.d.ts} +0 -0
package/dist/getters/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './stream-report-options.
|
|
2
|
-
export * from './stream-report-callback.
|
|
1
|
+
export * from './stream-report-options.js';
|
|
2
|
+
export * from './stream-report-callback.js';
|
package/dist/getters/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./stream-report-options.
|
|
2
|
-
export * from "./stream-report-callback.
|
|
1
|
+
export * from "./stream-report-options.js";
|
|
2
|
+
export * from "./stream-report-callback.js";
|
|
@@ -3,18 +3,15 @@ import { xfs } from '@yarnpkg/fslib';
|
|
|
3
3
|
import { runSchematicHelper } from '../helpers/index.js';
|
|
4
4
|
import { writeTmpSchematicHelper } from '../helpers/index.js';
|
|
5
5
|
import { prepareTmpDir } from '../helpers/index.js';
|
|
6
|
+
import { ensureSchematicSucceeded } from '../helpers/index.js';
|
|
6
7
|
export const getStreamReportCallback = async (options) => {
|
|
7
8
|
const streamReportCallback = async (report) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
catch (error) {
|
|
16
|
-
console.error(error);
|
|
17
|
-
}
|
|
9
|
+
const tmpDir = await xfs.mktempPromise();
|
|
10
|
+
const collectionPath = ppath.join(tmpDir, 'collection.json');
|
|
11
|
+
const { cwd } = options;
|
|
12
|
+
await writeTmpSchematicHelper(tmpDir, cwd);
|
|
13
|
+
await prepareTmpDir(tmpDir);
|
|
14
|
+
ensureSchematicSucceeded(await runSchematicHelper('project', options, collectionPath));
|
|
18
15
|
};
|
|
19
16
|
return streamReportCallback;
|
|
20
17
|
};
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export * from './run-schematics.
|
|
2
|
-
export * from './write-tmp-schematic.
|
|
3
|
-
export * from './prepare-tmp-dir.
|
|
1
|
+
export * from './run-schematics.js';
|
|
2
|
+
export * from './write-tmp-schematic.js';
|
|
3
|
+
export * from './prepare-tmp-dir.js';
|
|
4
|
+
export * from './raijin.js';
|
|
5
|
+
export * from './schematic-result.js';
|
package/dist/helpers/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export * from "./run-schematics.
|
|
2
|
-
export * from "./write-tmp-schematic.
|
|
3
|
-
export * from "./prepare-tmp-dir.
|
|
1
|
+
export * from "./run-schematics.js";
|
|
2
|
+
export * from "./write-tmp-schematic.js";
|
|
3
|
+
export * from "./prepare-tmp-dir.js";
|
|
4
|
+
export * from "./raijin.js";
|
|
5
|
+
export * from "./schematic-result.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import tsconfig from '@atls/config-typescript';
|
|
2
|
+
import { writeFiles as writeGeneratedRaijinFiles } from '../generated/raijin-schematic-export.js';
|
|
3
|
+
export const writeRaijinFiles = async (_cwd, baseDir) => {
|
|
4
|
+
await writeGeneratedRaijinFiles(baseDir);
|
|
5
|
+
};
|
|
6
|
+
export const getRaijinCompilerOptions = async (_cwd) => tsconfig.compilerOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UnsuccessfulWorkflowExecution } from '@angular-devkit/schematics';
|
|
2
2
|
import { NodeWorkflow } from '@angular-devkit/schematics/tools';
|
|
3
|
-
import { eventsLogHelper } from './events-log.
|
|
3
|
+
import { eventsLogHelper } from './events-log.js';
|
|
4
4
|
export const runSchematicHelper = async (schematicName, options, collectionPath) => {
|
|
5
5
|
const dryRun = false;
|
|
6
6
|
const debug = true;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ensureSchematicSucceeded: (exitCode: 0 | 1) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PortablePath } from '@yarnpkg/fslib';
|
|
2
|
-
export declare const writeTmpSchematicHelper: (tmpDir: PortablePath) => Promise<void>;
|
|
2
|
+
export declare const writeTmpSchematicHelper: (tmpDir: PortablePath, cwd?: string) => Promise<void>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { mkdir } from 'node:fs/promises';
|
|
2
2
|
import { ppath } from '@yarnpkg/fslib';
|
|
3
3
|
import { writeSchematicFactory } from '../generated/index.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
await
|
|
4
|
+
import { writeRaijinFiles } from './raijin.js';
|
|
5
|
+
export const writeTmpSchematicHelper = async (tmpDir, cwd = process.cwd()) => {
|
|
6
|
+
await writeRaijinFiles(cwd, tmpDir);
|
|
7
7
|
const projectDir = ppath.join(tmpDir, 'project');
|
|
8
8
|
await mkdir(projectDir, { recursive: true });
|
|
9
9
|
await writeSchematicFactory(ppath.join(projectDir, 'project.factory.cjs'));
|
|
@@ -37,7 +37,7 @@ export const main = (options) => {
|
|
|
37
37
|
const state = {};
|
|
38
38
|
return chain([
|
|
39
39
|
captureGitIgnoreContentRule(state),
|
|
40
|
-
updateTsConfigRule,
|
|
40
|
+
updateTsConfigRule(options),
|
|
41
41
|
mergeWith(generateCommonSource(options), MergeStrategy.Overwrite),
|
|
42
42
|
mergeWith(generateProjectSpecificSource(options), MergeStrategy.Overwrite),
|
|
43
43
|
mergeGitIgnoreContentRule(state),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './factory.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./factory.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './update
|
|
1
|
+
export * from './tsconfig.update.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./update
|
|
1
|
+
export * from "./tsconfig.update.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './undefined-build-result.
|
|
1
|
+
export * from './undefined-build-result.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./undefined-build-result.
|
|
1
|
+
export * from "./undefined-build-result.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './esbuild-config.
|
|
2
|
-
export * from './cjs-content.
|
|
3
|
-
export * from './encoded-content.
|
|
4
|
-
export * from './generated-file-content.
|
|
1
|
+
export * from './esbuild-config.js';
|
|
2
|
+
export * from './cjs-content.js';
|
|
3
|
+
export * from './encoded-content.js';
|
|
4
|
+
export * from './generated-file-content.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./esbuild-config.
|
|
2
|
-
export * from "./cjs-content.
|
|
3
|
-
export * from "./encoded-content.
|
|
4
|
-
export * from "./generated-file-content.
|
|
1
|
+
export * from "./esbuild-config.js";
|
|
2
|
+
export * from "./cjs-content.js";
|
|
3
|
+
export * from "./encoded-content.js";
|
|
4
|
+
export * from "./generated-file-content.js";
|
package/dist/scripts/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './schematic-build.
|
|
1
|
+
export * from './schematic-build.js';
|
package/dist/scripts/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./schematic-build.
|
|
1
|
+
export * from "./schematic-build.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { esbuildBuildStep } from './build-steps/index.js';
|
|
3
|
+
import { generateSchematic } from './schematic-build.js';
|
|
4
|
+
const raijinSchematicDir = join(import.meta.dirname, '../../../../yarn/raijin/src/runtime/schematic');
|
|
5
|
+
const raijinSchematicOutputFile = join(import.meta.dirname, '../generated/raijin-schematic-export.ts');
|
|
6
|
+
try {
|
|
7
|
+
await esbuildBuildStep();
|
|
8
|
+
await generateSchematic(raijinSchematicDir, raijinSchematicOutputFile);
|
|
9
|
+
}
|
|
10
|
+
catch (e) {
|
|
11
|
+
const error = e;
|
|
12
|
+
console.error('SchematicFactory build error!');
|
|
13
|
+
console.error(error.message);
|
|
14
|
+
}
|
|
15
|
+
console.info('SchematicFactory build successed');
|
|
@@ -9,7 +9,7 @@ const helperScanRoots = [
|
|
|
9
9
|
'scripts/raijin',
|
|
10
10
|
'README.md',
|
|
11
11
|
'README_EN.md',
|
|
12
|
-
'code/code-schematics/src/scripts/schematic-smoke.
|
|
12
|
+
'code/code-schematics/src/scripts/schematic-smoke.ts',
|
|
13
13
|
'docs/README.md',
|
|
14
14
|
'docs/README.ru.md',
|
|
15
15
|
'docs/raijin/README.md',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atls/code-schematics",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "yarn run build:schematic-factory && yarn run build:library",
|
|
19
19
|
"build:library": "yarn library build",
|
|
20
|
-
"build:schematic-factory": "yarn node ./src/scripts/schematic-factory-build.
|
|
20
|
+
"build:schematic-factory": "yarn node ./src/scripts/schematic-factory-build.ts",
|
|
21
21
|
"prepack": "yarn run build",
|
|
22
22
|
"postpack": "rm -rf dist",
|
|
23
|
-
"smoke:schematic": "yarn node ./src/scripts/schematic-smoke.
|
|
23
|
+
"smoke:schematic": "yarn node ./src/scripts/schematic-smoke.ts"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@angular-devkit/core": "19.1.5",
|
|
27
27
|
"@angular-devkit/schematics": "19.1.5",
|
|
28
|
+
"@atls/config-typescript": "2.0.3",
|
|
28
29
|
"js-yaml": "4.1.0",
|
|
29
30
|
"strip-json-comments": "3.1.1"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
|
-
"@atls/code-runtime": "2.1.34",
|
|
33
33
|
"@types/node": "24.12.2",
|
|
34
34
|
"@yarnpkg/cli": "4.14.1",
|
|
35
35
|
"@yarnpkg/core": "4.7.0",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { esbuildBuildStep } from './build-steps/index.js';
|
|
2
|
-
try {
|
|
3
|
-
await esbuildBuildStep();
|
|
4
|
-
}
|
|
5
|
-
catch (e) {
|
|
6
|
-
const error = e;
|
|
7
|
-
console.error('SchematicFactory build error!');
|
|
8
|
-
console.error(error.message);
|
|
9
|
-
}
|
|
10
|
-
console.info('SchematicFactory build successed');
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/scripts/exceptions/{undefined-build-result.exception.js → undefined-build-result.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/scripts/getters/{generated-file-content.getter.d.ts → generated-file-content.d.ts}
RENAMED
|
File without changes
|
/package/dist/scripts/getters/{generated-file-content.getter.js → generated-file-content.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|