@ngxs/store 19.0.0-dev.master-84d0061 → 19.0.0-dev.master-2b2355c
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/migrations/migrations.json +11 -0
- package/migrations/src/19_1_0/__snapshots__/index.spec.ts.snap +151 -0
- package/migrations/src/19_1_0/index.js +213 -0
- package/migrations/src/19_1_0/index.js.map +1 -0
- package/migrations/src/19_1_0/index.spec.js +220 -0
- package/migrations/src/19_1_0/index.spec.js.map +1 -0
- package/package.json +5 -1
- package/schematics/src/actions/actions.factory.js +3 -3
- package/schematics/src/actions/actions.factory.js.map +1 -1
- package/schematics/src/ng-add/add-declaration.js +1 -1
- package/schematics/src/ng-add/add-declaration.js.map +1 -1
- package/schematics/src/ng-add/ng-add.factory.js +4 -4
- package/schematics/src/ng-add/ng-add.factory.js.map +1 -1
- package/schematics/src/starter-kit/starter-kit.factory.js +3 -3
- package/schematics/src/starter-kit/starter-kit.factory.js.map +1 -1
- package/schematics/src/state/state.factory.js +4 -4
- package/schematics/src/state/state.factory.js.map +1 -1
- package/schematics/src/store/store.factory.js +4 -4
- package/schematics/src/store/store.factory.js.map +1 -1
- package/schematics-utils/_testing/index.js +18 -0
- package/schematics-utils/_testing/index.js.map +1 -0
- package/schematics-utils/_testing/schematics.js +70 -0
- package/schematics-utils/_testing/schematics.js.map +1 -0
- package/schematics-utils/src/common/lib.config.js.map +1 -0
- package/schematics-utils/src/common/properties.js.map +1 -0
- package/schematics-utils/src/config.js.map +1 -0
- package/schematics-utils/src/file-utils.js +26 -0
- package/schematics-utils/src/file-utils.js.map +1 -0
- package/schematics-utils/src/generate-utils.js.map +1 -0
- package/schematics-utils/src/normalize-options.js.map +1 -0
- package/schematics-utils/src/project.js.map +1 -0
- package/schematics/src/utils/common/lib.config.js.map +0 -1
- package/schematics/src/utils/common/project-files.config.js +0 -7
- package/schematics/src/utils/common/project-files.config.js.map +0 -1
- package/schematics/src/utils/common/properties.js.map +0 -1
- package/schematics/src/utils/config.js.map +0 -1
- package/schematics/src/utils/generate-utils.js.map +0 -1
- package/schematics/src/utils/interfaces/package.interface.js +0 -3
- package/schematics/src/utils/interfaces/package.interface.js.map +0 -1
- package/schematics/src/utils/normalize-options.js.map +0 -1
- package/schematics/src/utils/project.js.map +0 -1
- package/schematics/src/utils/versions.json +0 -3
- /package/{schematics/src/utils → schematics-utils/src}/common/lib.config.js +0 -0
- /package/{schematics/src/utils → schematics-utils/src}/common/properties.js +0 -0
- /package/{schematics/src/utils → schematics-utils/src}/config.js +0 -0
- /package/{schematics/src/utils → schematics-utils/src}/generate-utils.js +0 -0
- /package/{schematics/src/utils → schematics-utils/src}/normalize-options.js +0 -0
- /package/{schematics/src/utils → schematics-utils/src}/project.js +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": ["@schematics/angular"],
|
|
3
|
+
"$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
4
|
+
"schematics": {
|
|
5
|
+
"ngxs-store-migration-19-1-0": {
|
|
6
|
+
"description": "Migrate to NGXS v19.1.0",
|
|
7
|
+
"version": "19.1.0",
|
|
8
|
+
"factory": "./src/19_1_0/index"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Migrate to 19.1.0 NgxsModule.forRoot migrate empty forRoot 1`] = `
|
|
4
|
+
"
|
|
5
|
+
import { NgxsModule, DispatchOutsideZoneNgxsExecutionStrategy } from '@ngxs/store';
|
|
6
|
+
import { NgModule } from '@angular/core';
|
|
7
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
8
|
+
|
|
9
|
+
import { AppRoutingModule } from './app-routing.module';
|
|
10
|
+
import { AppComponent } from './app.component';
|
|
11
|
+
|
|
12
|
+
@NgModule({
|
|
13
|
+
declarations: [
|
|
14
|
+
AppComponent
|
|
15
|
+
],
|
|
16
|
+
imports: [
|
|
17
|
+
BrowserModule,
|
|
18
|
+
AppRoutingModule,
|
|
19
|
+
NgxsModule.forRoot([], { executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy })
|
|
20
|
+
],
|
|
21
|
+
bootstrap: [AppComponent]
|
|
22
|
+
})
|
|
23
|
+
export class AppModule { }
|
|
24
|
+
"
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
exports[`Migrate to 19.1.0 NgxsModule.forRoot migrate forRoot from a constant array 1`] = `
|
|
28
|
+
"
|
|
29
|
+
import { NgxsModule, DispatchOutsideZoneNgxsExecutionStrategy } from '@ngxs/store';
|
|
30
|
+
import { NgModule } from '@angular/core';
|
|
31
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
32
|
+
|
|
33
|
+
import { AppRoutingModule } from './app-routing.module';
|
|
34
|
+
import { AppComponent } from './app.component';
|
|
35
|
+
|
|
36
|
+
const imports = [
|
|
37
|
+
BrowserModule,
|
|
38
|
+
AppRoutingModule,
|
|
39
|
+
NgxsModule.forRoot(states, {foo:'bar', executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy})
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
@NgModule({
|
|
43
|
+
declarations: [
|
|
44
|
+
AppComponent
|
|
45
|
+
],
|
|
46
|
+
imports,
|
|
47
|
+
bootstrap: [AppComponent]
|
|
48
|
+
})
|
|
49
|
+
export class AppModule { }
|
|
50
|
+
"
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
exports[`Migrate to 19.1.0 NgxsModule.forRoot migrate forRoot with states 1`] = `
|
|
54
|
+
"
|
|
55
|
+
import { NgxsModule, DispatchOutsideZoneNgxsExecutionStrategy } from '@ngxs/store';
|
|
56
|
+
import { NgModule } from '@angular/core';
|
|
57
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
58
|
+
|
|
59
|
+
import { AppRoutingModule } from './app-routing.module';
|
|
60
|
+
import { AppComponent } from './app.component';
|
|
61
|
+
|
|
62
|
+
@NgModule({
|
|
63
|
+
declarations: [
|
|
64
|
+
AppComponent
|
|
65
|
+
],
|
|
66
|
+
imports: [
|
|
67
|
+
BrowserModule,
|
|
68
|
+
AppRoutingModule,
|
|
69
|
+
NgxsModule.forRoot(states, { executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy })
|
|
70
|
+
],
|
|
71
|
+
bootstrap: [AppComponent]
|
|
72
|
+
})
|
|
73
|
+
export class AppModule { }
|
|
74
|
+
"
|
|
75
|
+
`;
|
|
76
|
+
|
|
77
|
+
exports[`Migrate to 19.1.0 NgxsModule.forRoot migrate forRoot with states and existing options 1`] = `
|
|
78
|
+
"
|
|
79
|
+
import { NgxsModule, DispatchOutsideZoneNgxsExecutionStrategy } from '@ngxs/store';
|
|
80
|
+
import { NgModule } from '@angular/core';
|
|
81
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
82
|
+
|
|
83
|
+
import { AppRoutingModule } from './app-routing.module';
|
|
84
|
+
import { AppComponent } from './app.component';
|
|
85
|
+
|
|
86
|
+
@NgModule({
|
|
87
|
+
declarations: [
|
|
88
|
+
AppComponent
|
|
89
|
+
],
|
|
90
|
+
imports: [
|
|
91
|
+
BrowserModule,
|
|
92
|
+
AppRoutingModule,
|
|
93
|
+
NgxsModule.forRoot(states, {foo:'bar', executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy})
|
|
94
|
+
],
|
|
95
|
+
bootstrap: [AppComponent]
|
|
96
|
+
})
|
|
97
|
+
export class AppModule { }
|
|
98
|
+
"
|
|
99
|
+
`;
|
|
100
|
+
|
|
101
|
+
exports[`Migrate to 19.1.0 provideStore migrate provideStore with states and existing options 1`] = `
|
|
102
|
+
"
|
|
103
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
104
|
+
import { AppComponent } from './app/app.component';
|
|
105
|
+
import { provideStore, DispatchOutsideZoneNgxsExecutionStrategy } from '@ngxs/store';
|
|
106
|
+
|
|
107
|
+
bootstrapApplication(AppComponent, {
|
|
108
|
+
providers: [provideStore([], {foo:'bar', executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy})],
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
"
|
|
112
|
+
`;
|
|
113
|
+
|
|
114
|
+
exports[`Migrate to 19.1.0 provideStore migrate provideStore with states and plugins 1`] = `
|
|
115
|
+
"
|
|
116
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
117
|
+
import { AppComponent } from './app/app.component';
|
|
118
|
+
import { provideStore, DispatchOutsideZoneNgxsExecutionStrategy } from '@ngxs/store';
|
|
119
|
+
|
|
120
|
+
bootstrapApplication(AppComponent, {
|
|
121
|
+
providers: [provideStore([], { executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy }, withNgxsRouterPlugin(), withNgxsStoragePlugin())],
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
"
|
|
125
|
+
`;
|
|
126
|
+
|
|
127
|
+
exports[`Migrate to 19.1.0 provideStore migrate provideStore with states without options 1`] = `
|
|
128
|
+
"
|
|
129
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
130
|
+
import { AppComponent } from './app/app.component';
|
|
131
|
+
import { provideStore, DispatchOutsideZoneNgxsExecutionStrategy } from '@ngxs/store';
|
|
132
|
+
|
|
133
|
+
bootstrapApplication(AppComponent, {
|
|
134
|
+
providers: [provideStore([], { executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy })],
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
"
|
|
138
|
+
`;
|
|
139
|
+
|
|
140
|
+
exports[`Migrate to 19.1.0 provideStore migrate provideStore with states, options and plugins 1`] = `
|
|
141
|
+
"
|
|
142
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
143
|
+
import { AppComponent } from './app/app.component';
|
|
144
|
+
import { provideStore, DispatchOutsideZoneNgxsExecutionStrategy } from '@ngxs/store';
|
|
145
|
+
|
|
146
|
+
bootstrapApplication(AppComponent, {
|
|
147
|
+
providers: [provideStore([], {foo:'bar', executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy}, withNgxsRouterPlugin(), withNgxsStoragePlugin())],
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
"
|
|
151
|
+
`;
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.default = default_1;
|
|
13
|
+
const ts = require("typescript");
|
|
14
|
+
const node_process_1 = require("node:process");
|
|
15
|
+
const project_1 = require("../../../schematics-utils/src/project");
|
|
16
|
+
const file_utils_1 = require("../../../schematics-utils/src/file-utils");
|
|
17
|
+
const change_1 = require("@schematics/angular/utility/change");
|
|
18
|
+
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
|
19
|
+
const EXECUTION_STRATEGY_OPTION = 'executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy';
|
|
20
|
+
function default_1() {
|
|
21
|
+
return (tree, _context) => {
|
|
22
|
+
const packageJson = tree.readJson('package.json');
|
|
23
|
+
const storePackage = packageJson['dependencies']['@ngxs/store'];
|
|
24
|
+
if (!storePackage) {
|
|
25
|
+
_context.logger.error(`No @ngxs/store found`);
|
|
26
|
+
return (0, node_process_1.exit)(1);
|
|
27
|
+
}
|
|
28
|
+
const mainFile = (0, project_1.getProjectMainFile)(tree);
|
|
29
|
+
if (!mainFile) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
(0, file_utils_1.visitTsFiles)(tree, tree.root, (source, path) => __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const hasNgxsModuleOrProvideStoreImported = source.statements
|
|
34
|
+
.filter(ts.isImportDeclaration)
|
|
35
|
+
.filter(importDeclaration => importDeclaration.moduleSpecifier.getText().includes('@ngxs/store'))
|
|
36
|
+
.filter(importDeclaration => {
|
|
37
|
+
var _a, _b, _c, _d;
|
|
38
|
+
const hasNgxsModule = (_b = (_a = importDeclaration.importClause) === null || _a === void 0 ? void 0 : _a.namedBindings) === null || _b === void 0 ? void 0 : _b.getText().includes('NgxsModule');
|
|
39
|
+
const hasProvideStore = (_d = (_c = importDeclaration.importClause) === null || _c === void 0 ? void 0 : _c.namedBindings) === null || _d === void 0 ? void 0 : _d.getText().includes('provideStore');
|
|
40
|
+
return hasNgxsModule || hasProvideStore;
|
|
41
|
+
});
|
|
42
|
+
if (!hasNgxsModuleOrProvideStoreImported.length) {
|
|
43
|
+
// Avoid running the migration if the NgxsModule or the provideStore is not imported
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const changes = [];
|
|
47
|
+
const ngxsModuleImportChanges = migrateNgxsForRoot(source, path, _context);
|
|
48
|
+
const provideStoreChanges = migrateProvideStore(source, path, _context);
|
|
49
|
+
changes.push(...ngxsModuleImportChanges, ...provideStoreChanges);
|
|
50
|
+
const recorder = tree.beginUpdate(path);
|
|
51
|
+
changes.forEach(change => {
|
|
52
|
+
if (change instanceof change_1.InsertChange) {
|
|
53
|
+
recorder.insertLeft(change.pos, change.toAdd);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
tree.commitUpdate(recorder);
|
|
57
|
+
}));
|
|
58
|
+
return tree;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
// ****** NGXS Module forRoot Migrations ******
|
|
62
|
+
function migrateNgxsForRoot(source, path, context) {
|
|
63
|
+
const ngxsModuleImport = findNgxsModuleImport(source);
|
|
64
|
+
const changes = [];
|
|
65
|
+
if (!ngxsModuleImport) {
|
|
66
|
+
return [];
|
|
67
|
+
}
|
|
68
|
+
const args = ngxsModuleImport.arguments;
|
|
69
|
+
if (!args.length) {
|
|
70
|
+
context.logger.info(`Migrating empty forRoot in ${path}`);
|
|
71
|
+
migrateEmptyForRoot(ngxsModuleImport.arguments.pos, path, changes);
|
|
72
|
+
}
|
|
73
|
+
else if (args.length === 1) {
|
|
74
|
+
context.logger.info(`Migrating forRoot with states in ${path}`);
|
|
75
|
+
migrateForRootWithStates(ngxsModuleImport.arguments[0].end, path, changes);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
context.logger.info(`Migrating forRoot with states and existing options in ${path}`);
|
|
79
|
+
migrateForRootWithExistingOptions(ngxsModuleImport.arguments, path, changes);
|
|
80
|
+
}
|
|
81
|
+
// add the import if it does not exists
|
|
82
|
+
addNgxsExecutionStrategyImport({
|
|
83
|
+
source,
|
|
84
|
+
path,
|
|
85
|
+
changes
|
|
86
|
+
});
|
|
87
|
+
return changes;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* NgxsModule.forRoot() -> NgxsModule.forRoot([], { executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy })
|
|
91
|
+
*/
|
|
92
|
+
function migrateEmptyForRoot(start, modulePath, changes) {
|
|
93
|
+
const newArguments = `[], { ${EXECUTION_STRATEGY_OPTION} }`;
|
|
94
|
+
changes.push(new change_1.InsertChange(modulePath, start, newArguments));
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* NgxsModule.forRoot(states) -> NgxsModule.forRoot(states, { executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy })
|
|
98
|
+
* provideStore([]) -> provideStore([], { executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy })
|
|
99
|
+
*/
|
|
100
|
+
function migrateForRootWithStates(start, modulePath, changes) {
|
|
101
|
+
const newArguments = `, { ${EXECUTION_STRATEGY_OPTION} }`;
|
|
102
|
+
changes.push(new change_1.InsertChange(modulePath, start, newArguments));
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* NgxsModule.forRoot([], { foo:'bar' }) -> NgxsModule.forRoot([], { foo:'bar', executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy })
|
|
106
|
+
*/
|
|
107
|
+
function migrateForRootWithExistingOptions(args, modulePath, changes) {
|
|
108
|
+
if (args.length === 2 && ts.isObjectLiteralExpression(args[1])) {
|
|
109
|
+
migrateExistingOptions(args, modulePath, changes);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
// ****** provideStore Migrations ******
|
|
113
|
+
function migrateProvideStore(source, path, context) {
|
|
114
|
+
const provideStoreImport = findProvideStore(source);
|
|
115
|
+
const changes = [];
|
|
116
|
+
if (!provideStoreImport) {
|
|
117
|
+
return [];
|
|
118
|
+
}
|
|
119
|
+
const args = provideStoreImport.arguments;
|
|
120
|
+
if (args.length === 1) {
|
|
121
|
+
// args.length === 1 --> provideStore([])
|
|
122
|
+
context.logger.info(`Migrating provideStore with states in ${path}`);
|
|
123
|
+
migrateForRootWithStates(provideStoreImport.arguments[0].end, path, changes);
|
|
124
|
+
}
|
|
125
|
+
else if (args.length >= 2) {
|
|
126
|
+
migrateProvideStoreWithExistingOptions(provideStoreImport.arguments, path, changes, context);
|
|
127
|
+
}
|
|
128
|
+
// add the import if it does not exist
|
|
129
|
+
addNgxsExecutionStrategyImport({
|
|
130
|
+
source,
|
|
131
|
+
path,
|
|
132
|
+
changes
|
|
133
|
+
});
|
|
134
|
+
return changes;
|
|
135
|
+
}
|
|
136
|
+
function findProvideStore(source) {
|
|
137
|
+
const nodes = (0, ast_utils_1.findNodes)(source, (node) => {
|
|
138
|
+
if (ts.isCallExpression(node) &&
|
|
139
|
+
ts.isIdentifier(node.expression) &&
|
|
140
|
+
node.expression.text === 'provideStore') {
|
|
141
|
+
return ts.isCallExpression(node);
|
|
142
|
+
}
|
|
143
|
+
return false;
|
|
144
|
+
});
|
|
145
|
+
if (nodes.length === 0) {
|
|
146
|
+
return undefined;
|
|
147
|
+
}
|
|
148
|
+
return nodes[0];
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* provideStore([], OPTIONS) -> provideStore([], { ...OPTIONS, executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy })
|
|
152
|
+
* provideStore([], OPTIONS, PLUGINS) -> provideStore([], { ...OPTIONS, executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy }, PLUGINS)
|
|
153
|
+
* provideStore([], PLUGINS) -> provideStore([], { executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy }, PLUGINS)
|
|
154
|
+
*/
|
|
155
|
+
function migrateProvideStoreWithExistingOptions(args, path, changes, context) {
|
|
156
|
+
if (args.length >= 2) {
|
|
157
|
+
// If the second argument is an object literal expression, we can add the executionStrategy property to same object
|
|
158
|
+
if (ts.isObjectLiteralExpression(args[1])) {
|
|
159
|
+
context.logger.info(`Migrating provideStore with states and existing options in ${path}`);
|
|
160
|
+
migrateExistingOptions(args, path, changes);
|
|
161
|
+
}
|
|
162
|
+
// if the second argument is not an object literal expression, we assume that it is a plugin
|
|
163
|
+
if (!ts.isObjectLiteralExpression(args[1]) && ts.isCallExpression(args[1])) {
|
|
164
|
+
context.logger.info(`Migrating provideStore with states, existing options and plugins in ${path}`);
|
|
165
|
+
const insertionPoint = args[0].end;
|
|
166
|
+
const toInsert = `, { ${EXECUTION_STRATEGY_OPTION} }`;
|
|
167
|
+
changes.push(new change_1.InsertChange(path, insertionPoint, toInsert));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
// *** Common Functions ***
|
|
172
|
+
function addNgxsExecutionStrategyImport(options) {
|
|
173
|
+
// add the import if it does not exists
|
|
174
|
+
const importChange = (0, ast_utils_1.insertImport)(options.source, options.path, 'DispatchOutsideZoneNgxsExecutionStrategy', '@ngxs/store');
|
|
175
|
+
if (importChange) {
|
|
176
|
+
options.changes.push(importChange);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
function findNgxsModuleImport(source) {
|
|
180
|
+
const nodes = (0, ast_utils_1.findNodes)(source, (node) => {
|
|
181
|
+
if (ts.isCallExpression(node) &&
|
|
182
|
+
ts.isPropertyAccessExpression(node.expression) &&
|
|
183
|
+
ts.isIdentifier(node.expression.expression) &&
|
|
184
|
+
node.expression.expression.text === 'NgxsModule' &&
|
|
185
|
+
ts.isIdentifier(node.expression.name) &&
|
|
186
|
+
node.expression.name.text === 'forRoot') {
|
|
187
|
+
return ts.isCallExpression(node);
|
|
188
|
+
}
|
|
189
|
+
return false;
|
|
190
|
+
});
|
|
191
|
+
if (nodes.length === 0) {
|
|
192
|
+
return undefined;
|
|
193
|
+
}
|
|
194
|
+
return nodes[0];
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* provideStore([], OPTIONS) -> provideStore([], { ...OPTIONS, executionStrategy: DispatchOutsideZoneNgxsExecutionStrategy })
|
|
198
|
+
*/
|
|
199
|
+
function migrateExistingOptions(args, path, changes) {
|
|
200
|
+
if (!ts.isObjectLiteralExpression(args[1])) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
const configObject = args[1];
|
|
204
|
+
const executionStrategyProperty = configObject.properties.find(prop => ts.isPropertyAssignment(prop) &&
|
|
205
|
+
ts.isIdentifier(prop.name) &&
|
|
206
|
+
prop.name.text === 'executionStrategy');
|
|
207
|
+
if (!executionStrategyProperty) {
|
|
208
|
+
const insertionPoint = configObject.properties.end;
|
|
209
|
+
const toInsert = `, ${EXECUTION_STRATEGY_OPTION}`;
|
|
210
|
+
changes.push(new change_1.InsertChange(path, insertionPoint, toInsert));
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","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,CAAC,EAAE,CAAC;QAC3C,OAAO;IACT,CAAC;IAED,MAAM,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAE7B,MAAM,yBAAyB,GAAG,YAAY,CAAC,UAAU,CAAC,IAAI,CAC5D,IAAI,CAAC,EAAE,CACL,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC;QAC7B,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;QAC1B,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,mBAAmB,CACzC,CAAC;IAEF,IAAI,CAAC,yBAAyB,EAAE,CAAC;QAC/B,MAAM,cAAc,GAAG,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC;QACnD,MAAM,QAAQ,GAAG,KAAK,yBAAyB,EAAE,CAAC;QAClD,OAAO,CAAC,IAAI,CAAC,IAAI,qBAAY,CAAC,IAAI,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC;IACjE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
13
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
14
|
+
const path_1 = require("path");
|
|
15
|
+
const _testing_1 = require("../../../schematics-utils/_testing");
|
|
16
|
+
const versions = require('../../../schematics-utils/src/versions.json');
|
|
17
|
+
const ngxsStoreVersion = versions['@ngxs/store'];
|
|
18
|
+
describe('Migrate to 19.1.0', () => {
|
|
19
|
+
const ngxsMigrationsRunner = new testing_1.SchematicTestRunner('@ngxs/store/migrations', (0, path_1.join)(devkit_1.workspaceRoot, 'packages/store/migrations/migrations.json'));
|
|
20
|
+
const testSetup = (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
const appTree = yield (0, _testing_1.createWorkspace)(options === null || options === void 0 ? void 0 : options.isStandalone);
|
|
22
|
+
appTree.overwrite('package.json', `{"dependencies": {"@ngxs/store": "${ngxsStoreVersion}"}}`);
|
|
23
|
+
return { appTree };
|
|
24
|
+
});
|
|
25
|
+
describe('NgxsModule.forRoot', () => {
|
|
26
|
+
it('migrate empty forRoot', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
27
|
+
const { appTree } = yield testSetup();
|
|
28
|
+
const newContent = `
|
|
29
|
+
import { NgxsModule } from '@ngxs/store';
|
|
30
|
+
import { NgModule } from '@angular/core';
|
|
31
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
32
|
+
|
|
33
|
+
import { AppRoutingModule } from './app-routing.module';
|
|
34
|
+
import { AppComponent } from './app.component';
|
|
35
|
+
|
|
36
|
+
@NgModule({
|
|
37
|
+
declarations: [
|
|
38
|
+
AppComponent
|
|
39
|
+
],
|
|
40
|
+
imports: [
|
|
41
|
+
BrowserModule,
|
|
42
|
+
AppRoutingModule,
|
|
43
|
+
NgxsModule.forRoot()
|
|
44
|
+
],
|
|
45
|
+
bootstrap: [AppComponent]
|
|
46
|
+
})
|
|
47
|
+
export class AppModule { }
|
|
48
|
+
`;
|
|
49
|
+
appTree.overwrite('/projects/foo/src/app/app.module.ts', newContent);
|
|
50
|
+
const tree = yield ngxsMigrationsRunner.runSchematic('ngxs-store-migration-19-1-0', {}, appTree);
|
|
51
|
+
const contentUpdate = tree.readContent('/projects/foo/src/app/app.module.ts');
|
|
52
|
+
expect(contentUpdate).toMatchSnapshot();
|
|
53
|
+
}));
|
|
54
|
+
it('migrate forRoot with states', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
55
|
+
const { appTree } = yield testSetup();
|
|
56
|
+
const newContent = `
|
|
57
|
+
import { NgxsModule } from '@ngxs/store';
|
|
58
|
+
import { NgModule } from '@angular/core';
|
|
59
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
60
|
+
|
|
61
|
+
import { AppRoutingModule } from './app-routing.module';
|
|
62
|
+
import { AppComponent } from './app.component';
|
|
63
|
+
|
|
64
|
+
@NgModule({
|
|
65
|
+
declarations: [
|
|
66
|
+
AppComponent
|
|
67
|
+
],
|
|
68
|
+
imports: [
|
|
69
|
+
BrowserModule,
|
|
70
|
+
AppRoutingModule,
|
|
71
|
+
NgxsModule.forRoot(states)
|
|
72
|
+
],
|
|
73
|
+
bootstrap: [AppComponent]
|
|
74
|
+
})
|
|
75
|
+
export class AppModule { }
|
|
76
|
+
`;
|
|
77
|
+
appTree.overwrite('/projects/foo/src/app/app.module.ts', newContent);
|
|
78
|
+
const tree = yield ngxsMigrationsRunner.runSchematic('ngxs-store-migration-19-1-0', {}, appTree);
|
|
79
|
+
const contentUpdate = tree.readContent('/projects/foo/src/app/app.module.ts');
|
|
80
|
+
expect(contentUpdate).toMatchSnapshot();
|
|
81
|
+
}));
|
|
82
|
+
it('migrate forRoot with states and existing options', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
83
|
+
const { appTree } = yield testSetup();
|
|
84
|
+
const newContent = `
|
|
85
|
+
import { NgxsModule } from '@ngxs/store';
|
|
86
|
+
import { NgModule } from '@angular/core';
|
|
87
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
88
|
+
|
|
89
|
+
import { AppRoutingModule } from './app-routing.module';
|
|
90
|
+
import { AppComponent } from './app.component';
|
|
91
|
+
|
|
92
|
+
@NgModule({
|
|
93
|
+
declarations: [
|
|
94
|
+
AppComponent
|
|
95
|
+
],
|
|
96
|
+
imports: [
|
|
97
|
+
BrowserModule,
|
|
98
|
+
AppRoutingModule,
|
|
99
|
+
NgxsModule.forRoot(states, {foo:'bar'})
|
|
100
|
+
],
|
|
101
|
+
bootstrap: [AppComponent]
|
|
102
|
+
})
|
|
103
|
+
export class AppModule { }
|
|
104
|
+
`;
|
|
105
|
+
appTree.overwrite('/projects/foo/src/app/app.module.ts', newContent);
|
|
106
|
+
const tree = yield ngxsMigrationsRunner.runSchematic('ngxs-store-migration-19-1-0', {}, appTree);
|
|
107
|
+
const contentUpdate = tree.readContent('/projects/foo/src/app/app.module.ts');
|
|
108
|
+
expect(contentUpdate).toMatchSnapshot();
|
|
109
|
+
}));
|
|
110
|
+
it('migrate forRoot from a constant array', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
111
|
+
const { appTree } = yield testSetup();
|
|
112
|
+
const newContent = `
|
|
113
|
+
import { NgxsModule } from '@ngxs/store';
|
|
114
|
+
import { NgModule } from '@angular/core';
|
|
115
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
116
|
+
|
|
117
|
+
import { AppRoutingModule } from './app-routing.module';
|
|
118
|
+
import { AppComponent } from './app.component';
|
|
119
|
+
|
|
120
|
+
const imports = [
|
|
121
|
+
BrowserModule,
|
|
122
|
+
AppRoutingModule,
|
|
123
|
+
NgxsModule.forRoot(states, {foo:'bar'})
|
|
124
|
+
];
|
|
125
|
+
|
|
126
|
+
@NgModule({
|
|
127
|
+
declarations: [
|
|
128
|
+
AppComponent
|
|
129
|
+
],
|
|
130
|
+
imports,
|
|
131
|
+
bootstrap: [AppComponent]
|
|
132
|
+
})
|
|
133
|
+
export class AppModule { }
|
|
134
|
+
`;
|
|
135
|
+
appTree.overwrite('/projects/foo/src/app/app.module.ts', newContent);
|
|
136
|
+
const tree = yield ngxsMigrationsRunner.runSchematic('ngxs-store-migration-19-1-0', {}, appTree);
|
|
137
|
+
const contentUpdate = tree.readContent('/projects/foo/src/app/app.module.ts');
|
|
138
|
+
expect(contentUpdate).toMatchSnapshot();
|
|
139
|
+
}));
|
|
140
|
+
});
|
|
141
|
+
describe('provideStore', () => {
|
|
142
|
+
it('migrate provideStore with states without options', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
143
|
+
const { appTree } = yield testSetup({
|
|
144
|
+
isStandalone: true
|
|
145
|
+
});
|
|
146
|
+
const newContent = `
|
|
147
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
148
|
+
import { AppComponent } from './app/app.component';
|
|
149
|
+
import { provideStore } from '@ngxs/store';
|
|
150
|
+
|
|
151
|
+
bootstrapApplication(AppComponent, {
|
|
152
|
+
providers: [provideStore([])],
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
`;
|
|
156
|
+
appTree.overwrite('/projects/foo/src/main.ts', newContent);
|
|
157
|
+
const tree = yield ngxsMigrationsRunner.runSchematic('ngxs-store-migration-19-1-0', {}, appTree);
|
|
158
|
+
const contentUpdate = tree.readContent('/projects/foo/src/main.ts');
|
|
159
|
+
expect(contentUpdate).toMatchSnapshot();
|
|
160
|
+
}));
|
|
161
|
+
it('migrate provideStore with states and existing options', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
162
|
+
const { appTree } = yield testSetup({
|
|
163
|
+
isStandalone: true
|
|
164
|
+
});
|
|
165
|
+
const newContent = `
|
|
166
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
167
|
+
import { AppComponent } from './app/app.component';
|
|
168
|
+
import { provideStore } from '@ngxs/store';
|
|
169
|
+
|
|
170
|
+
bootstrapApplication(AppComponent, {
|
|
171
|
+
providers: [provideStore([], {foo:'bar'})],
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
`;
|
|
175
|
+
appTree.overwrite('/projects/foo/src/main.ts', newContent);
|
|
176
|
+
const tree = yield ngxsMigrationsRunner.runSchematic('ngxs-store-migration-19-1-0', {}, appTree);
|
|
177
|
+
const contentUpdate = tree.readContent('/projects/foo/src/main.ts');
|
|
178
|
+
expect(contentUpdate).toMatchSnapshot();
|
|
179
|
+
}));
|
|
180
|
+
it('migrate provideStore with states, options and plugins', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
181
|
+
const { appTree } = yield testSetup({
|
|
182
|
+
isStandalone: true
|
|
183
|
+
});
|
|
184
|
+
const newContent = `
|
|
185
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
186
|
+
import { AppComponent } from './app/app.component';
|
|
187
|
+
import { provideStore } from '@ngxs/store';
|
|
188
|
+
|
|
189
|
+
bootstrapApplication(AppComponent, {
|
|
190
|
+
providers: [provideStore([], {foo:'bar'}, withNgxsRouterPlugin(), withNgxsStoragePlugin())],
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
`;
|
|
194
|
+
appTree.overwrite('/projects/foo/src/main.ts', newContent);
|
|
195
|
+
const tree = yield ngxsMigrationsRunner.runSchematic('ngxs-store-migration-19-1-0', {}, appTree);
|
|
196
|
+
const contentUpdate = tree.readContent('/projects/foo/src/main.ts');
|
|
197
|
+
expect(contentUpdate).toMatchSnapshot();
|
|
198
|
+
}));
|
|
199
|
+
it('migrate provideStore with states and plugins', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
200
|
+
const { appTree } = yield testSetup({
|
|
201
|
+
isStandalone: true
|
|
202
|
+
});
|
|
203
|
+
const newContent = `
|
|
204
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
205
|
+
import { AppComponent } from './app/app.component';
|
|
206
|
+
import { provideStore } from '@ngxs/store';
|
|
207
|
+
|
|
208
|
+
bootstrapApplication(AppComponent, {
|
|
209
|
+
providers: [provideStore([], withNgxsRouterPlugin(), withNgxsStoragePlugin())],
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
`;
|
|
213
|
+
appTree.overwrite('/projects/foo/src/main.ts', newContent);
|
|
214
|
+
const tree = yield ngxsMigrationsRunner.runSchematic('ngxs-store-migration-19-1-0', {}, appTree);
|
|
215
|
+
const contentUpdate = tree.readContent('/projects/foo/src/main.ts');
|
|
216
|
+
expect(contentUpdate).toMatchSnapshot();
|
|
217
|
+
}));
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
//# sourceMappingURL=index.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../../packages/store/migrations/src/19_1_0/index.spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gEAAyE;AACzE,yCAA6C;AAC7C,+BAA4B;AAC5B,iEAAqE;AAErE,MAAM,QAAQ,GAAG,OAAO,CAAC,6CAA6C,CAAC,CAAC;AACxE,MAAM,gBAAgB,GAAW,QAAQ,CAAC,aAAa,CAAC,CAAC;AAEzD,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,MAAM,oBAAoB,GAAG,IAAI,6BAAmB,CAClD,wBAAwB,EACxB,IAAA,WAAI,EAAC,sBAAa,EAAE,2CAA2C,CAAC,CACjE,CAAC;IAEF,MAAM,SAAS,GAAG,CAAO,OAAoC,EAAE,EAAE;QAC/D,MAAM,OAAO,GAAG,MAAM,IAAA,0BAAe,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,CAAC,CAAC;QAC7D,OAAO,CAAC,SAAS,CACf,cAAc,EACd,qCAAqC,gBAAgB,KAAK,CAC3D,CAAC;QAEF,OAAO,EAAE,OAAO,EAAE,CAAC;IACrB,CAAC,CAAA,CAAC;IAEF,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;QAClC,EAAE,CAAC,uBAAuB,EAAE,GAAS,EAAE;YACrC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,SAAS,EAAE,CAAC;YAEtC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;OAoBlB,CAAC;YAEF,OAAO,CAAC,SAAS,CAAC,qCAAqC,EAAE,UAAU,CAAC,CAAC;YAErE,MAAM,IAAI,GAAG,MAAM,oBAAoB,CAAC,YAA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AC,CAAC,eAAe,EAAE,CAAC;QAC1C,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngxs/store",
|
|
3
|
-
"version": "19.0.0-dev.master-
|
|
3
|
+
"version": "19.0.0-dev.master-2b2355c",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
"rxjs": ">=7.0.0"
|
|
9
9
|
},
|
|
10
10
|
"schematics": "./schematics/collection.json",
|
|
11
|
+
"ng-update": {
|
|
12
|
+
"packageGroupName": "@ngxs/store",
|
|
13
|
+
"migrations": "./migrations/migrations.json"
|
|
14
|
+
},
|
|
11
15
|
"module": "fesm2022/ngxs-store.mjs",
|
|
12
16
|
"typings": "index.d.ts",
|
|
13
17
|
"exports": {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.actions = actions;
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const generate_utils_1 = require("
|
|
6
|
-
const properties_1 = require("
|
|
7
|
-
const normalize_options_1 = require("
|
|
5
|
+
const generate_utils_1 = require("../../../schematics-utils/src/generate-utils");
|
|
6
|
+
const properties_1 = require("../../../schematics-utils/src/common/properties");
|
|
7
|
+
const normalize_options_1 = require("../../../schematics-utils/src/normalize-options");
|
|
8
8
|
const path_1 = require("path");
|
|
9
9
|
function actions(options) {
|
|
10
10
|
return (host) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.factory.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/actions/actions.factory.ts"],"names":[],"mappings":";;AAOA,0BAeC;AAtBD,2DAAkF;AAElF,
|
|
1
|
+
{"version":3,"file":"actions.factory.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/actions/actions.factory.ts"],"names":[],"mappings":";;AAOA,0BAeC;AAtBD,2DAAkF;AAElF,iFAA6E;AAC7E,gFAA0E;AAC1E,uFAAuF;AACvF,+BAA4B;AAE5B,SAAgB,OAAO,CAAC,OAAsB;IAC5C,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,IAAI,IAAA,oBAAO,EAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,gCAAmB,CAAC,sCAAsC,CAAC,CAAC;QACxE,CAAC;QAED,MAAM,iBAAiB,GAAG,IAAA,wCAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC9D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI;YACvB,CAAC,CAAC,iBAAiB,CAAC,IAAI;YACxB,CAAC,CAAC,IAAA,WAAI,EAAC,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAEzD,OAAO,IAAA,8BAAa,EAAC,IAAA,gBAAG,EAAC,SAAS,CAAC,EAAE,IAAI,EAAE;YACzC,IAAI,EAAE,iBAAiB,CAAC,IAAI;SAC7B,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -16,7 +16,7 @@ const rules_1 = require("@schematics/angular/utility/standalone/rules");
|
|
|
16
16
|
const util_1 = require("@schematics/angular/utility/standalone/util");
|
|
17
17
|
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
|
18
18
|
const app_config_1 = require("@schematics/angular/utility/standalone/app_config");
|
|
19
|
-
const lib_config_1 = require("
|
|
19
|
+
const lib_config_1 = require("../../../schematics-utils/src/common/lib.config");
|
|
20
20
|
function addDeclarationToStandaloneApp(options) {
|
|
21
21
|
return (host) => __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-declaration.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/ng-add/add-declaration.ts"],"names":[],"mappings":";;;;;;;;;;;AAaA,sEAkCC;AAED,4EAuBC;AAxED,2DAAyD;AACzD,wEAA8F;AAC9F,sEAKqD;AACrD,qEAAqE;AACrE,kFAAkF;AAClF,
|
|
1
|
+
{"version":3,"file":"add-declaration.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/ng-add/add-declaration.ts"],"names":[],"mappings":";;;;;;;;;;;AAaA,sEAkCC;AAED,4EAuBC;AAxED,2DAAyD;AACzD,wEAA8F;AAC9F,sEAKqD;AACrD,qEAAqE;AACrE,kFAAkF;AAClF,gFAA4E;AAG5E,SAAgB,6BAA6B,CAAC,OAAoC;IAChF,OAAO,CAAM,IAAI,EAAC,EAAE;;QAClB,MAAM,YAAY,GAAG,MAAM,IAAA,sBAAe,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAClE,MAAM,aAAa,GAAG,IAAA,mCAA4B,EAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QACvE,MAAM,iBAAiB,GACrB,CAAA,MAAA,IAAA,0BAAa,EAAC,aAAa,EAAE,IAAI,EAAE,YAAY,CAAC,0CAAE,QAAQ,KAAI,YAAY,CAAC;QAE7E,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO;aAC5B,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;aAC9B,GAAG,CAAC,CAAC,CAAC,EAAuB,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAE,CAAC,UAAU,CAAC,CAAC,CAAC;QAEvE,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,qBAAqB,CAAC,EAAQ,EAAE;YAC9E,OAAO,UAAU,CAAC,EAAE;gBAClB,MAAM,MAAM,GAAG,IAAA,wBAAY,EACzB,IAAA,oBAAa,EAAC,IAAI,EA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;IAEL,MAAM,UAAU,GAAG,aAAa,CAAC;IAEjC,MAAM,kBAAkB,GACtB,yEAAyE,CAAC;IAE5E,OAAO,IAAA,kBAAK,EAAC;QACX,IAAA,qBAAa,EACX,OAAO,CAAC,OAAO,EACf,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,IAAI,CAAA,GAAG,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC,GAAG,kBAAkB,EAAE,CACzF;QACD,GAAG,WAAW;KACf,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,GAAoE,IAAI,GAAG,CAAC;IAC1F;QACE,sBAAS,CAAC,QAAQ;QAClB;YACE,MAAM,EAAE,+BAA+B;YACvC,UAAU,EAAE,6BAA6B;SAC1C;KACF;IACD;QACE,sBAAS,CAAC,IAAI;QACd;YACE,MAAM,EAAE,sBAAsB;YAC9B,UAAU,EAAE,oBAAoB;SACjC;KACF;IACD;QACE,sBAAS,CAAC,MAAM;QAChB;YACE,MAAM,EAAE,wBAAwB;YAChC,UAAU,EAAE,sBAAsB;SACnC;KACF;IACD;QACE,sBAAS,CAAC,MAAM;QAChB;YACE,MAAM,EAAE,wBAAwB;YAChC,UAAU,EAAE,sBAAsB;SACnC;KACF;IACD;QACE,sBAAS,CAAC,OAAO;QACjB;YACE,MAAM,EAAE,yBAAyB;YACjC,UAAU,EAAE,uBAAuB;SACpC;KACF;IACD;QACE,sBAAS,CAAC,KAAK;QACf;YACE,UAAU,EAAE,cAAc;SAC3B;KACF;IACD;QACE,sBAAS,CAAC,SAAS;QACnB;YACE,MAAM,EAAE,2BAA2B;YACnC,UAAU,EAAE,yBAAyB;SACtC;KACF;CACF,CAAC,CAAC"}
|
|
@@ -13,12 +13,12 @@ exports.ngAdd = ngAdd;
|
|
|
13
13
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
14
14
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
15
15
|
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
|
16
|
-
const lib_config_1 = require("
|
|
17
|
-
const project_1 = require("
|
|
16
|
+
const lib_config_1 = require("../../../schematics-utils/src/common/lib.config");
|
|
17
|
+
const project_1 = require("../../../schematics-utils/src/project");
|
|
18
18
|
const add_declaration_1 = require("./add-declaration");
|
|
19
|
-
const project_2 = require("
|
|
19
|
+
const project_2 = require("../../../schematics-utils/src/project");
|
|
20
20
|
const ng_ast_utils_1 = require("@schematics/angular/utility/ng-ast-utils");
|
|
21
|
-
const versions = require('
|
|
21
|
+
const versions = require('../../../schematics-utils/src/versions.json');
|
|
22
22
|
function ngAdd(options) {
|
|
23
23
|
return (host) => {
|
|
24
24
|
const normalizedSchema = normalizeSchema(host, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-add.factory.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/ng-add/ng-add.factory.ts"],"names":[],"mappings":";;;;;;;;;;;AAkCA,sBAUC;AA5CD,2DAOoC;AACpC,4DAA0E;AAC1E,2EAIkD;AAElD,
|
|
1
|
+
{"version":3,"file":"ng-add.factory.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/ng-add/ng-add.factory.ts"],"names":[],"mappings":";;;;;;;;;;;AAkCA,sBAUC;AA5CD,2DAOoC;AACpC,4DAA0E;AAC1E,2EAIkD;AAElD,gFAA4E;AAG5E,mEAA2E;AAC3E,uDAG2B;AAC3B,mEAAmE;AACnE,2EAA2E;AAE3E,MAAM,QAAQ,GAAG,OAAO,CAAC,6CAA6C,CAAC,CAAC;AAQxE,SAAgB,KAAK,CAAC,OAA0B;IAC9C,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,MAAM,gBAAgB,GAAG,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAExD,OAAO,IAAA,kBAAK,EAAC;YACX,2BAA2B,CAAC,gBAAgB,CAAC;YAC7C,cAAc,CAAC,gBAAgB,CAAC;YAChC,gBAAgB,CAAC,WAAW,CAAC,CAA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CAAC,MAAmC;IACzD,OAAO,CAAO,IAAU,EAAE,EAAE;QAC1B,MAAM,QAAQ,GAAG,IAAA,4BAAkB,EAAC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC1D,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO;QACT,CAAC;QACD,MAAM,YAAY,GAAG,IAAA,8BAAe,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAErD,IAAI,YAAY,EAAE,CAAC;YACjB,OAAO,IAAA,+CAA6B,EAAC,MAAM,CAAC,CAAC;QAC/C,CAAC;aAAM,CAAC;YACN,OAAO,IAAA,kDAAgC,EAAC,MAAM,CAAC,CAAC;QAClD,CAAC;IACH,CAAC,CAAA,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,IAAU,EAAE,MAAyB;;IAC5D,MAAM,WAAW,GAAG,MAAA,IAAA,oBAAU,EAAC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,0CAAE,IAAI,CAAC;IAC3D,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,gCAAmB,CAAC,YAAY,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;IAC/E,CAAC;IACD,OAAO;QACL,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,WAAW;QACjC,OAAO,EAAE,MAAA,MAAM,CAAC,MAAM,CAAC,sBAAS,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,WAAC,OAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,QAAQ,CAAC,GAAG,CAAC,CAAA,EAAA,CAAC,mCAAI,EAAE;QACpF,OAAO,EAAE,WAAW;KACrB,CAAC;AACJ,CAAC"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.starterKit = starterKit;
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const generate_utils_1 = require("
|
|
5
|
+
const generate_utils_1 = require("../../../schematics-utils/src/generate-utils");
|
|
6
6
|
const ng_ast_utils_1 = require("@schematics/angular/utility/ng-ast-utils");
|
|
7
|
-
const project_1 = require("
|
|
8
|
-
const normalize_options_1 = require("
|
|
7
|
+
const project_1 = require("../../../schematics-utils/src/project");
|
|
8
|
+
const normalize_options_1 = require("../../../schematics-utils/src/normalize-options");
|
|
9
9
|
function starterKit(options) {
|
|
10
10
|
return (host) => {
|
|
11
11
|
let isStandalone = options.standalone;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"starter-kit.factory.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/starter-kit/starter-kit.factory.ts"],"names":[],"mappings":";;AAOA,gCAiBC;AAxBD,2DAA6D;AAC7D,
|
|
1
|
+
{"version":3,"file":"starter-kit.factory.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/starter-kit/starter-kit.factory.ts"],"names":[],"mappings":";;AAOA,gCAiBC;AAxBD,2DAA6D;AAC7D,iFAA6E;AAC7E,2EAA2E;AAC3E,mEAA2E;AAC3E,uFAAgF;AAGhF,SAAgB,UAAU,CAAC,OAAyB;IAClD,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,IAAI,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC;QACtC,IAAI,OAAO,YAAY,KAAK,SAAS,EAAE,CAAC;YACtC,MAAM,QAAQ,GAAG,IAAA,4BAAkB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YAC3D,YAAY,GAAG,CAAC,CAAC,QAAQ,IAAI,IAAA,8BAAe,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM,cAAc,GAAG,IAAA,iCAAa,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEnD,OAAO,IAAA,8BAAa,EAClB,IAAA,gBAAG,EAAC,SAAS,CAAC,EACd,cAAc,kCACT,OAAO,KAAE,YAAY,KAC1B,OAAO,CAAC,IAAI,CACb,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.state = state;
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
5
|
const path_1 = require("path");
|
|
6
|
-
const properties_1 = require("
|
|
7
|
-
const generate_utils_1 = require("
|
|
6
|
+
const properties_1 = require("../../../schematics-utils/src/common/properties");
|
|
7
|
+
const generate_utils_1 = require("../../../schematics-utils/src/generate-utils");
|
|
8
8
|
const ng_ast_utils_1 = require("@schematics/angular/utility/ng-ast-utils");
|
|
9
|
-
const project_1 = require("
|
|
10
|
-
const normalize_options_1 = require("
|
|
9
|
+
const project_1 = require("../../../schematics-utils/src/project");
|
|
10
|
+
const normalize_options_1 = require("../../../schematics-utils/src/normalize-options");
|
|
11
11
|
function state(options) {
|
|
12
12
|
return (host) => {
|
|
13
13
|
if ((0, properties_1.isEmpty)(options.name)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.factory.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/state/state.factory.ts"],"names":[],"mappings":";;AASA,sBAwBC;AAjCD,2DAAkF;AAClF,+BAA4B;AAC5B,
|
|
1
|
+
{"version":3,"file":"state.factory.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/state/state.factory.ts"],"names":[],"mappings":";;AASA,sBAwBC;AAjCD,2DAAkF;AAClF,+BAA4B;AAC5B,gFAA0E;AAC1E,iFAA6E;AAC7E,2EAA2E;AAC3E,mEAA2E;AAC3E,uFAAuF;AAGvF,SAAgB,KAAK,CAAC,OAAoB;IACxC,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,IAAI,IAAA,oBAAO,EAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,gCAAmB,CAAC,sCAAsC,CAAC,CAAC;QACxE,CAAC;QAED,IAAI,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC;QACtC,IAAI,OAAO,YAAY,KAAK,SAAS,EAAE,CAAC;YACtC,MAAM,QAAQ,GAAG,IAAA,4BAAkB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YAC3D,YAAY,GAAG,CAAC,CAAC,QAAQ,IAAI,IAAA,8BAAe,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM,iBAAiB,GAAG,IAAA,wCAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC9D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI;YACvB,CAAC,CAAC,iBAAiB,CAAC,IAAI;YACxB,CAAC,CAAC,IAAA,WAAI,EAAC,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAEzD,OAAO,IAAA,8BAAa,EAClB,IAAA,gBAAG,EAAC,SAAS,CAAC,EACd,IAAI,kCACC,iBAAiB,KAAE,YAAY,KACpC,OAAO,CAAC,IAAI,CACb,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.store = store;
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
5
|
const path_1 = require("path");
|
|
6
|
-
const properties_1 = require("
|
|
7
|
-
const generate_utils_1 = require("
|
|
6
|
+
const properties_1 = require("../../../schematics-utils/src/common/properties");
|
|
7
|
+
const generate_utils_1 = require("../../../schematics-utils/src/generate-utils");
|
|
8
8
|
const ng_ast_utils_1 = require("@schematics/angular/utility/ng-ast-utils");
|
|
9
|
-
const project_1 = require("
|
|
10
|
-
const normalize_options_1 = require("
|
|
9
|
+
const project_1 = require("../../../schematics-utils/src/project");
|
|
10
|
+
const normalize_options_1 = require("../../../schematics-utils/src/normalize-options");
|
|
11
11
|
function store(options) {
|
|
12
12
|
return (host) => {
|
|
13
13
|
if ((0, properties_1.isEmpty)(options.name)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.factory.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/store/store.factory.ts"],"names":[],"mappings":";;AASA,sBAwBC;AAjCD,2DAAkF;AAClF,+BAA4B;AAC5B,
|
|
1
|
+
{"version":3,"file":"store.factory.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/store/store.factory.ts"],"names":[],"mappings":";;AASA,sBAwBC;AAjCD,2DAAkF;AAClF,+BAA4B;AAC5B,gFAA0E;AAC1E,iFAA6E;AAC7E,2EAA2E;AAC3E,mEAA2E;AAC3E,uFAAuF;AAGvF,SAAgB,KAAK,CAAC,OAAoB;IACxC,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,IAAI,IAAA,oBAAO,EAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,gCAAmB,CAAC,sCAAsC,CAAC,CAAC;QACxE,CAAC;QAED,IAAI,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC;QACtC,IAAI,OAAO,YAAY,KAAK,SAAS,EAAE,CAAC;YACtC,MAAM,QAAQ,GAAG,IAAA,4BAAkB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YAC3D,YAAY,GAAG,CAAC,CAAC,QAAQ,IAAI,IAAA,8BAAe,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM,iBAAiB,GAAG,IAAA,wCAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC9D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI;YACvB,CAAC,CAAC,iBAAiB,CAAC,IAAI;YACxB,CAAC,CAAC,IAAA,WAAI,EAAC,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAEzD,OAAO,IAAA,8BAAa,EAClB,IAAA,gBAAG,EAAC,SAAS,CAAC,EACd,IAAI,kCACC,iBAAiB,KAAE,YAAY,KACpC,OAAO,CAAC,IAAI,CACb,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./schematics"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/store/schematics-utils/_testing/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.createWorkspace = createWorkspace;
|
|
13
|
+
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
14
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
15
|
+
const path = require("path");
|
|
16
|
+
const angularSchematicRunner = new testing_1.SchematicTestRunner('@schematics/angular', path.join(devkit_1.workspaceRoot, 'node_modules/@schematics/angular/collection.json'));
|
|
17
|
+
const defaultWorkspaceOptions = {
|
|
18
|
+
name: 'workspace',
|
|
19
|
+
newProjectRoot: 'projects',
|
|
20
|
+
version: '1.0.0'
|
|
21
|
+
};
|
|
22
|
+
const defaultAppOptions = {
|
|
23
|
+
name: 'foo',
|
|
24
|
+
inlineStyle: false,
|
|
25
|
+
inlineTemplate: false,
|
|
26
|
+
routing: true,
|
|
27
|
+
skipTests: false,
|
|
28
|
+
skipPackageJson: false
|
|
29
|
+
};
|
|
30
|
+
function createWorkspace() {
|
|
31
|
+
return __awaiter(this, arguments, void 0, function* (standalone = false, schematicRunner = angularSchematicRunner, workspaceOptions = defaultWorkspaceOptions, appOptions = defaultAppOptions) {
|
|
32
|
+
let appTree = yield schematicRunner.runSchematic('workspace', workspaceOptions);
|
|
33
|
+
appTree = yield schematicRunner.runSchematic('application', Object.assign(Object.assign({}, appOptions), {
|
|
34
|
+
// Specify explicitly because it's truthy by default since Angular 17.
|
|
35
|
+
standalone }), appTree);
|
|
36
|
+
standalone && updateToStandalone(appTree, workspaceOptions, appOptions);
|
|
37
|
+
return appTree;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
// Note: This is a workaround to convert the application as standalone. Should be removed when migrating to NG17
|
|
41
|
+
function updateToStandalone(appTree, workspaceOptions, appOptions) {
|
|
42
|
+
const mainTsContent = `
|
|
43
|
+
import {
|
|
44
|
+
bootstrapApplication,
|
|
45
|
+
} from '@angular/platform-browser';
|
|
46
|
+
import { AppComponent } from './app/app.component';
|
|
47
|
+
|
|
48
|
+
bootstrapApplication(AppComponent).catch((err) =>
|
|
49
|
+
console.error(err),
|
|
50
|
+
);
|
|
51
|
+
`;
|
|
52
|
+
const appComponentContent = `
|
|
53
|
+
import { Component } from '@angular/core';
|
|
54
|
+
|
|
55
|
+
@Component({
|
|
56
|
+
selector: 'app-root',
|
|
57
|
+
standalone: true,
|
|
58
|
+
templateUrl: './app.component.html',
|
|
59
|
+
styleUrls: ['./app.component.scss'],
|
|
60
|
+
})
|
|
61
|
+
export class AppComponent {}
|
|
62
|
+
`;
|
|
63
|
+
const projectPath = `/${workspaceOptions.newProjectRoot}/${appOptions.name}`;
|
|
64
|
+
appTree.overwrite(`${projectPath}/src/main.ts`, mainTsContent);
|
|
65
|
+
appTree.overwrite(`${projectPath}/src/app/app.component.ts`, appComponentContent);
|
|
66
|
+
if (appTree.files.includes(`${projectPath}/src/app/app.module.ts`)) {
|
|
67
|
+
appTree.delete(`${projectPath}/src/app/app.module.ts`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=schematics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../../packages/store/schematics-utils/_testing/schematics.ts"],"names":[],"mappings":";;;;;;;;;;;AA0BA,0CAuBC;AAjDD,gEAAuF;AACvF,yCAA6C;AAG7C,6BAA6B;AAE7B,MAAM,sBAAsB,GAAG,IAAI,6BAAmB,CACpD,qBAAqB,EACrB,IAAI,CAAC,IAAI,CAAC,sBAAa,EAAE,kDAAkD,CAAC,CAC7E,CAAC;AAEF,MAAM,uBAAuB,GAAqB;IAChD,IAAI,EAAE,WAAW;IACjB,cAAc,EAAE,UAAU;IAC1B,OAAO,EAAE,OAAO;CACjB,CAAC;AAEF,MAAM,iBAAiB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|
+
{"version":3,"file":"lib.config.js","sourceRoot":"","sources":["../../../../../packages/store/schematics-utils/src/common/lib.config.ts"],"names":[],"mappings":";;;AAAA,IAAY,SASX;AATD,WAAY,SAAS;IACnB,+CAAkC,CAAA;IAClC,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,2CAA8B,CAAA;IAC9B,2CAA8B,CAAA;IAC9B,6CAAgC,CAAA;IAChC,kCAAqB,CAAA;IACrB,iDAAoC,CAAA;AACtC,CAAC,EATW,SAAS,yBAAT,SAAS,QASpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../../../packages/store/schematics-utils/src/common/properties.ts"],"names":[],"mappings":";;AAAA,0BAEC;AAFD,SAAgB,OAAO,CAAC,KAAyB;IAC/C,OAAO,OAAO,KAAK,KAAK,WAAW,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../packages/store/schematics-utils/src/config.ts"],"names":[],"mappings":";;AAkIA,4CAKC;AAED,oCASC;AAlJD,2DAAuE;AAkIvE,SAAgB,gBAAgB,CAAC,IAAU;IACzC,MAAM,aAAa,GAAG,CAAC,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IAC7E,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAE3D,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,YAAY,CAAC,IAAU;IACrC,MAAM,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACpC,MAAM,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACnD,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QAC1B,MAAM,IAAI,gCAAmB,CAAC,mBAAmB,IAAI,GAAG,CAAC,CAAC;IAC5D,CAAC;IACD,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC;IAEvC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.visitTsFiles = visitTsFiles;
|
|
4
|
+
const ts = require("typescript");
|
|
5
|
+
function visitTsFiles(tree, dirPath = tree.root, visitor) {
|
|
6
|
+
function visit(directory) {
|
|
7
|
+
for (const path of directory.subfiles) {
|
|
8
|
+
if (path.endsWith('.ts') && !path.endsWith('.d.ts')) {
|
|
9
|
+
const entry = directory.file(path);
|
|
10
|
+
if (entry) {
|
|
11
|
+
const content = entry.content;
|
|
12
|
+
const source = ts.createSourceFile(entry.path, content.toString(), ts.ScriptTarget.Latest, true);
|
|
13
|
+
visitor(source, entry.path);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
for (const path of directory.subdirs) {
|
|
18
|
+
if (path === 'node_modules') {
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
visit(directory.dir(path));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
visit(dirPath);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=file-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-utils.js","sourceRoot":"","sources":["../../../../packages/store/schematics-utils/src/file-utils.ts"],"names":[],"mappings":";;AAGA,oCAgCC;AAlCD,iCAAiC;AAEjC,SAAgB,YAAY,CAC1B,IAAU,EACV,OAAO,GAAG,IAAI,CAAC,IAAI,EACnB,OAA8D;IAE9D,SAAS,KAAK,CAAC,SAAmB;QAChC,KAAK,MAAM,IAAI,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;YACtC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBACpD,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACnC,IAAI,KAAK,EAAE,CAAC;oBACV,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;oBAC9B,MAAM,MAAM,GAAG,EAAE,CAAC,gBAAgB,CAChC,KAAK,CAAC,IAAI,EACV,OAAO,CAAC,QAAQ,EAAE,EAClB,EAAE,CAAC,YAAY,CAAC,MAAM,EACtB,IAAI,CACL,CAAC;oBACF,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;gBAC9B,CAAC;YACH,CAAC;QACH,CAAC;QAED,KAAK,MAAM,IAAI,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;YACrC,IAAI,IAAI,KAAK,cAAc,EAAE,CAAC;gBAC5B,SAAS;YACX,CAAC;YAED,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-utils.js","sourceRoot":"","sources":["../../../../packages/store/schematics-utils/src/generate-utils.ts"],"names":[],"mappings":";;AAYA,sCAmBC;AA/BD,+CAA+C;AAC/C,2DASoC;AAEpC,SAAgB,aAAa,CAC3B,SAAiB,EACjB,MAAc,EACd,aAEC,EACD,aAAuB;IAEvB,OAAO,IAAA,sBAAS,EACd,IAAA,kBAAK,EAAC,SAAS,EAAE;QACf,aAAa,CAAC,CAAC,CAAC,IAAA,iBAAI,GAAE,CAAC,CAAC,CAAC,IAAA,mBAAM,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAChE,IAAA,qBAAQ,gCACN,QAAQ,EAAE,EAAE,IACT,cAAO,GACP,aAAa,EAChB;QACF,IAAA,iBAAI,EAAC,MAAM,CAAC;KACb,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../packages/store/schematics-utils/src/normalize-options.ts"],"names":[],"mappings":";;AAUA,oDAiBC;AAED,sCAEC;AAGD,4DAQC;AA1CD,+CAA0D;AAC1D,uCAA2C;AAS3C,SAAgB,oBAAoB,CAClC,IAAU,EACV,OAAU;IAEV,MAAM,IAAI,GAAW,cAAO,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,IAAI,GAAG,IAAA,wBAAc,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAE3C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IAED,uCACK,OAAO,KACV,IAAI,EACJ,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,IAAI,CAAC,OAAO,IACrB;AACJ,CAAC;AAED,SAAgB,aAAa,CAAC,IAAwB;IACpD,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAA,gBAAS,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACnD,CAAC;AAED,2EAA2E;AAC3E,SAAgB,wBAAwB,CACtC,KAA0B,EAC1B,YAAqB;IAErB,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;QACtC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","s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c,CAAC,OAAiB,CAAC;IAC1C,CAAC;IAED,MAAM,IAAI,gCAAmB,CAAC,+CAA+C,CAAC,CAAC;AACjF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lib.config.js","sourceRoot":"","sources":["../../../../../../packages/store/schematics/src/utils/common/lib.config.ts"],"names":[],"mappings":";;;AAAA,IAAY,SASX;AATD,WAAY,SAAS;IACnB,+CAAkC,CAAA;IAClC,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,2CAA8B,CAAA;IAC9B,2CAA8B,CAAA;IAC9B,6CAAgC,CAAA;IAChC,kCAAqB,CAAA;IACrB,iDAAoC,CAAA;AACtC,CAAC,EATW,SAAS,yBAAT,SAAS,QASpB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TSCONFIG_SPEC_JSON = exports.ANGULAR_JSON = exports.PACKAGE_JSON = void 0;
|
|
4
|
-
exports.PACKAGE_JSON = 'package.json';
|
|
5
|
-
exports.ANGULAR_JSON = 'angular.json';
|
|
6
|
-
exports.TSCONFIG_SPEC_JSON = 'src/tsconfig.spec.json';
|
|
7
|
-
//# sourceMappingURL=project-files.config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-files.config.js","sourceRoot":"","sources":["../../../../../../packages/store/schematics/src/utils/common/project-files.config.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG,cAAc,CAAC;AAC9B,QAAA,YAAY,GAAG,cAAc,CAAC;AAC9B,QAAA,kBAAkB,GAAG,wBAAwB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../../../../packages/store/schematics/src/utils/common/properties.ts"],"names":[],"mappings":";;AAAA,0BAEC;AAFD,SAAgB,OAAO,CAAC,KAAyB;IAC/C,OAAO,OAAO,KAAK,KAAK,WAAW,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC;AAC9D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/utils/config.ts"],"names":[],"mappings":";;AAkIA,4CAKC;AAED,oCASC;AAlJD,2DAAuE;AAkIvE,SAAgB,gBAAgB,CAAC,IAAU;IACzC,MAAM,aAAa,GAAG,CAAC,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IAC7E,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAE3D,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,YAAY,CAAC,IAAU;IACrC,MAAM,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACpC,MAAM,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACnD,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QAC1B,MAAM,IAAI,gCAAmB,CAAC,mBAAmB,IAAI,GAAG,CAAC,CAAC;IAC5D,CAAC;IACD,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC;IAEvC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate-utils.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/utils/generate-utils.ts"],"names":[],"mappings":";;AAYA,sCAmBC;AA/BD,+CAA+C;AAC/C,2DASoC;AAEpC,SAAgB,aAAa,CAC3B,SAAiB,EACjB,MAAc,EACd,aAEC,EACD,aAAuB;IAEvB,OAAO,IAAA,sBAAS,EACd,IAAA,kBAAK,EAAC,SAAS,EAAE;QACf,aAAa,CAAC,CAAC,CAAC,IAAA,iBAAI,GAAE,CAAC,CAAC,CAAC,IAAA,mBAAM,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAChE,IAAA,qBAAQ,gCACN,QAAQ,EAAE,EAAE,IACT,cAAO,GACP,aAAa,EAChB;QACF,IAAA,iBAAI,EAAC,MAAM,CAAC;KACb,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package.interface.js","sourceRoot":"","sources":["../../../../../../packages/store/schematics/src/utils/interfaces/package.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-options.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/utils/normalize-options.ts"],"names":[],"mappings":";;AAUA,oDAiBC;AAED,sCAEC;AAGD,4DAQC;AA1CD,+CAA0D;AAC1D,uCAA2C;AAS3C,SAAgB,oBAAoB,CAClC,IAAU,EACV,OAAU;IAEV,MAAM,IAAI,GAAW,cAAO,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,IAAI,GAAG,IAAA,wBAAc,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAE3C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IAED,uCACK,OAAO,KACV,IAAI,EACJ,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,IAAI,CAAC,OAAO,IACrB;AACJ,CAAC;AAED,SAAgB,aAAa,CAAC,IAAwB;IACpD,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAA,gBAAS,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACnD,CAAC;AAED,2EAA2E;AAC3E,SAAgB,wBAAwB,CACtC,KAA0B,EAC1B,YAAqB;IAErB,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;QACtC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/utils/project.ts"],"names":[],"mappings":";;AAcA,gCAoBC;AAED,wCAoBC;AAED,sBAIC;AAED,gDAsBC;AArFD,qCAAwC;AACxC,2DAAuE;AACvE,+BAA4B;AAW5B,SAAgB,UAAU,CAAC,IAAU,EAAE,OAAgB;IACrD,MAAM,SAAS,GAAG,IAAA,qBAAY,EAAC,IAAI,CAAC,CAAC;IAErC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,cAAc,GAAI,SAAyC,CAAC,cAAc,CAAC;QACjF,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YACrD,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC9B,OAAO,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,eAAe,GAAG,OAAO,IAAI,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC/D,IAAI,eAAe,EAAE,CAAC;QACpB,eAAe,CAAC,IAAI,GAAG,OAAO,CAAC;QAE/B,OAAO,eAAe,CAAC;IACzB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,cAAc,CAC5B,IAAU,EACV,OAAoE;;IAEpE,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAElD,IAAI,CAAC,OAAO,EAAE,CAAC;QAC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AAG,eAAe,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;IAElE,IAAI,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,IAAI,EAAE,CAAC;QACzB,OAAO,cAAc,CAAC,IAAc,CAAC;IACvC,CAAC;SAAM,IAAI,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,OAAO,EAAE,CAAC;QACnC,OAAO,cAAc,CAAC,OAAiB,CAAC;IAC1C,CAAC;IAED,MAAM,IAAI,gCAAmB,CAAC,+CAA+C,CAAC,CAAC;AACjF,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|