@ngrx/effects
Advanced tools
Comparing version 8.0.0-rc.0 to 8.0.0-rc.1
/** | ||
* @license NgRx 8.0.0-rc.0 | ||
* @license NgRx 8.0.0-rc.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license NgRx 8.0.0-rc.0 | ||
* @license NgRx 8.0.0-rc.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license NgRx 8.0.0-rc.0 | ||
* @license NgRx 8.0.0-rc.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license NgRx 8.0.0-rc.0 | ||
* @license NgRx 8.0.0-rc.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license NgRx 8.0.0-rc.0 | ||
* @license NgRx 8.0.0-rc.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license NgRx 8.0.0-rc.0 | ||
* @license NgRx 8.0.0-rc.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license NgRx 8.0.0-rc.0 | ||
* @license NgRx 8.0.0-rc.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license NgRx 8.0.0-rc.0 | ||
* @license NgRx 8.0.0-rc.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -4,0 +4,0 @@ * License: MIT |
{ | ||
"name": "@ngrx/effects", | ||
"version": "8.0.0-rc.0", | ||
"version": "8.0.0-rc.1", | ||
"description": "Side effect model for @ngrx/store", | ||
@@ -25,3 +25,3 @@ "repository": { | ||
"@angular/core": "^8.0.0-beta", | ||
"@ngrx/store": "8.0.0-rc.0", | ||
"@ngrx/store": "8.0.0-rc.1", | ||
"rxjs": "^6.5.0" | ||
@@ -28,0 +28,0 @@ }, |
/// <amd-module name="@ngrx/effects/schematics-core" /> | ||
import { dasherize, decamelize, camelize, classify, underscore, group, capitalize, featurePath } from './utility/strings'; | ||
export { findNodes, getSourceNodes, getDecoratorMetadata, getContentOfKeyLiteral, insertAfterLastOccurrence, insertImport, addBootstrapToModule, addDeclarationToModule, addExportToModule, addImportToModule, addProviderToModule, } from './utility/ast-utils'; | ||
export { findNodes, getSourceNodes, getDecoratorMetadata, getContentOfKeyLiteral, insertAfterLastOccurrence, insertImport, addBootstrapToModule, addDeclarationToModule, addExportToModule, addImportToModule, addProviderToModule, replaceImport, } from './utility/ast-utils'; | ||
export { Host, Change, NoopChange, InsertChange, RemoveChange, ReplaceChange, createReplaceChange, createChangeRecorder, } from './utility/change'; | ||
@@ -23,1 +23,2 @@ export { AppConfig, getWorkspace, getWorkspacePath } from './utility/config'; | ||
export { platformVersion } from './utility/libs-version'; | ||
export { visitTSSourceFiles } from './utility/visit-utils'; |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define("@ngrx/effects/schematics-core", ["require", "exports", "@ngrx/effects/schematics-core/utility/strings", "@ngrx/effects/schematics-core/utility/ast-utils", "@ngrx/effects/schematics-core/utility/change", "@ngrx/effects/schematics-core/utility/config", "@ngrx/effects/schematics-core/utility/find-module", "@ngrx/effects/schematics-core/utility/ngrx-utils", "@ngrx/effects/schematics-core/utility/project", "@ngrx/effects/schematics-core/utility/update", "@ngrx/effects/schematics-core/utility/parse-name", "@ngrx/effects/schematics-core/utility/package", "@ngrx/effects/schematics-core/utility/libs-version"], factory); | ||
define("@ngrx/effects/schematics-core", ["require", "exports", "@ngrx/effects/schematics-core/utility/strings", "@ngrx/effects/schematics-core/utility/ast-utils", "@ngrx/effects/schematics-core/utility/change", "@ngrx/effects/schematics-core/utility/config", "@ngrx/effects/schematics-core/utility/find-module", "@ngrx/effects/schematics-core/utility/ngrx-utils", "@ngrx/effects/schematics-core/utility/project", "@ngrx/effects/schematics-core/utility/update", "@ngrx/effects/schematics-core/utility/parse-name", "@ngrx/effects/schematics-core/utility/package", "@ngrx/effects/schematics-core/utility/libs-version", "@ngrx/effects/schematics-core/utility/visit-utils"], factory); | ||
} | ||
@@ -26,2 +26,3 @@ })(function (require, exports) { | ||
exports.addProviderToModule = ast_utils_1.addProviderToModule; | ||
exports.replaceImport = ast_utils_1.replaceImport; | ||
var change_1 = require("@ngrx/effects/schematics-core/utility/change"); | ||
@@ -69,3 +70,5 @@ exports.NoopChange = change_1.NoopChange; | ||
exports.platformVersion = libs_version_1.platformVersion; | ||
var visit_utils_1 = require("@ngrx/effects/schematics-core/utility/visit-utils"); | ||
exports.visitTSSourceFiles = visit_utils_1.visitTSSourceFiles; | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9tb2R1bGVzL2VmZmVjdHMvc2NoZW1hdGljcy1jb3JlL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0lBQUEsMkVBUzJCO0lBRTNCLDZFQVk2QjtJQVgzQixnQ0FBQSxTQUFTLENBQUE7SUFDVCxxQ0FBQSxjQUFjLENBQUE7SUFDZCwyQ0FBQSxvQkFBb0IsQ0FBQTtJQUNwQiw2Q0FBQSxzQkFBc0IsQ0FBQTtJQUN0QixnREFBQSx5QkFBeUIsQ0FBQTtJQUN6QixtQ0FBQSxZQU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bXBvcnRUb05nTW9kdWxlLFxuICBhZGRSZWR1Y2VyVG9BY3Rpb25SZWR1Y2VyTWFwLFxuICBvbWl0LFxufSBmcm9tICcuL3V0aWxpdHkvbmdyeC11dGlscyc7XG5cbmV4cG9ydCB7IGdldFByb2plY3RQYXRoLCBnZXRQcm9qZWN0LCBpc0xpYiB9IGZyb20gJy4vdXRpbGl0eS9wcm9qZWN0JztcblxuZXhwb3J0IGNvbnN0IHN0cmluZ1V0aWxzID0ge1xuICBkYXNoZXJpemUsXG4gIGRlY2FtZWxpemUsXG4gIGNhbWVsaXplLFxuICBjbGFzc2lmeSxcbiAgdW5kZXJzY29yZSxcbiAgZ3JvdXAsXG4gIGNhcGl0YWxpemUsXG4gIGZlYXR1cmVQYXRoLFxufTtcblxuZXhwb3J0IHsgdXBkYXRlUGFja2FnZSB9IGZyb20gJy4vdXRpbGl0eS91cGRhdGUnO1xuXG5leHBvcnQgeyBwYXJzZU5hbWUgfSBmcm9tICcuL3V0aWxpdHkvcGFyc2UtbmFtZSc7XG5cbmV4cG9ydCB7IGFkZFBhY2thZ2VUb1BhY2thZ2VKc29uIH0gZnJvbSAnLi91dGlsaXR5L3BhY2thZ2UnO1xuXG5leHBvcnQgeyBwbGF0Zm9ybVZlcnNpb24gfSBmcm9tICcuL3V0aWxpdHkvbGlicy12ZXJzaW9uJztcblxuZXhwb3J0IHsgdmlzaXRUU1NvdXJjZUZpbGVzIH0gZnJvbSAnLi91dGlsaXR5L3Zpc2l0LXV0aWxzJztcbiJdfQ== |
@@ -10,3 +10,4 @@ /// <amd-module name="@ngrx/effects/schematics-core/utility/ast-utils" /> | ||
import * as ts from 'typescript'; | ||
import { Change } from './change'; | ||
import { Change, ReplaceChange } from './change'; | ||
import { Path } from '@angular-devkit/core'; | ||
/** | ||
@@ -74,1 +75,2 @@ * Find all nodes from the AST in the subtree of node of SyntaxKind kind. | ||
export declare function insertImport(source: ts.SourceFile, fileToEdit: string, symbolName: string, fileName: string, isDefault?: boolean): Change; | ||
export declare function replaceImport(sourceFile: ts.SourceFile, path: Path, importFrom: string, importAsIs: string, importToBe: string): ReplaceChange[]; |
@@ -51,7 +51,7 @@ /// <amd-module name="@ngrx/effects/schematics-core/utility/change" /> | ||
path: string; | ||
private pos; | ||
private toRemove; | ||
pos: number; | ||
end: number; | ||
order: number; | ||
description: string; | ||
constructor(path: string, pos: number, toRemove: string); | ||
constructor(path: string, pos: number, end: number); | ||
apply(host: Host): Promise<void>; | ||
@@ -64,3 +64,3 @@ } | ||
path: string; | ||
private pos; | ||
pos: number; | ||
oldText: string; | ||
@@ -74,2 +74,2 @@ newText: string; | ||
export declare function createReplaceChange(sourceFile: ts.SourceFile, path: Path, node: ts.Node, oldText: string, newText: string): ReplaceChange; | ||
export declare function createChangeRecorder(tree: Tree, path: Path, changes: ReplaceChange[]): UpdateRecorder; | ||
export declare function createChangeRecorder(tree: Tree, path: string, changes: Change[]): UpdateRecorder; |
@@ -56,10 +56,10 @@ (function (factory) { | ||
class RemoveChange { | ||
constructor(path, pos, toRemove) { | ||
constructor(path, pos, end) { | ||
this.path = path; | ||
this.pos = pos; | ||
this.toRemove = toRemove; | ||
if (pos < 0) { | ||
this.end = end; | ||
if (pos < 0 || end < 0) { | ||
throw new Error('Negative positions are invalid'); | ||
} | ||
this.description = `Removed ${toRemove} into position ${pos} of ${path}`; | ||
this.description = `Removed text in position ${pos} to ${end} of ${path}`; | ||
this.order = pos; | ||
@@ -70,3 +70,3 @@ } | ||
const prefix = content.substring(0, this.pos); | ||
const suffix = content.substring(this.pos + this.toRemove.length); | ||
const suffix = content.substring(this.end); | ||
// TODO: throw error if toRemove doesn't match removed string. | ||
@@ -114,5 +114,12 @@ return host.write(this.path, `${prefix}${suffix}`); | ||
for (const change of changes) { | ||
const action = change; | ||
recorder.remove(action.pos, action.oldText.length); | ||
recorder.insertLeft(action.pos, action.newText); | ||
if (change instanceof InsertChange) { | ||
recorder.insertLeft(change.pos, change.toAdd); | ||
} | ||
else if (change instanceof RemoveChange) { | ||
recorder.remove(change.pos, change.end - change.pos); | ||
} | ||
else if (change instanceof ReplaceChange) { | ||
recorder.remove(change.pos, change.oldText.length); | ||
recorder.insertLeft(change.pos, change.newText); | ||
} | ||
} | ||
@@ -123,2 +130,2 @@ return recorder; | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhbmdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbW9kdWxlcy9lZmZlY3RzL3NjaGVtYXRpY3MtY29yZS91dGlsaXR5L2NoYW5nZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztJQWdDQTs7T0FFRztJQUNILE1BQWEsVUFBVTtRQUF2QjtZQUNFLGdCQUFXLEdBQUcsZUFBZSxDQUFDO1lBQzlCLFVBQUssR0FBRyxRQUFRLENBQUM7WUFDakIsU0FBSSxHQUFHLElBQUksQ0FBQztRQUlkLENBQUM7UUFIQyxLQUFLO1lBQ0gsT0FBTyxPQUFPLENBQUMsT0FBTyxFQUFFLENBQUM7UUFDM0IsQ0FBQztLQUNGO0lBUEQsZ0NBT0M7SUFFRDs7T0FFRztJQUNILE1BQWEsWUFBWTtRQUl2QixZQUFtQixJQUFZLEVBQVMsR0FBVyxFQUFTLEtBQWE7WUFBdEQsU0FBSSxHQUFKLElBQUksQ0FBUTtZQUFTLFFBQUcsR0FBSCxHQUFHLENBQVE7WUFBUyxVQUFLLEdBQUwsS0FBSyxDQUFRO1lBQ3ZFLElBQUksR0FBRyxHQUFHLENBQUMsRUFBRTtnQkFDWCxNQUFNLElBQUksS0FBSyxDQUFDLGdDQUFnQyxDQUFDLENBQUM7YUFDbkQ7WUFDRCxJQUFJLENBQUMsV0FBVyxHQUFHLFlBQVksS0FBSyxrQkFBa0IsR0FBRyxPQUFPLElBQUksRUFBRSxDQUFDO1lBQ3ZFLElBQUksQ0FBQy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B9XG4gIHJldHVybiByZWNvcmRlcjtcbn1cbiJdfQ== |
/** | ||
* @license NgRx 8.0.0-rc.0 | ||
* @license NgRx 8.0.0-rc.1 | ||
* (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin | ||
@@ -4,0 +4,0 @@ * License: MIT |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
641272
131
5489