@ssv/ngx.command 3.0.0-dev.25 → 3.0.0-dev.32
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 +0 -2
- package/eslint.config.js +21 -21
- package/jest.config.ts +12 -12
- package/package.json +2 -3
- package/src/command.options.ts +14 -10
- package/src/test-setup.ts +1 -1
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
[projectUri]: https://github.com/sketch7/ngx.command
|
|
2
1
|
[npm]: https://www.npmjs.com
|
|
3
2
|
[commandpatternwiki]: https://en.wikipedia.org/wiki/Command_pattern
|
|
4
3
|
|
|
5
4
|
# @ssv/ngx.command
|
|
6
|
-
[](https://github.com/sketch7/ngx.command/actions/workflows/ci.yml)
|
|
7
5
|
[](https://badge.fury.io/js/%40ssv%2Fngx.command)
|
|
8
6
|
|
|
9
7
|
[Command pattern][commandpatternwiki] implementation for angular. Command's are used to encapsulate information which is needed to perform an action.
|
package/eslint.config.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
const nx = require(
|
|
2
|
-
const baseConfig = require(
|
|
1
|
+
const nx = require("@nx/eslint-plugin");
|
|
2
|
+
const baseConfig = require("../../eslint.config.js");
|
|
3
3
|
|
|
4
4
|
module.exports = [
|
|
5
5
|
...baseConfig,
|
|
6
6
|
{
|
|
7
|
-
files: [
|
|
7
|
+
files: ["**/*.json"],
|
|
8
8
|
rules: {
|
|
9
|
-
|
|
9
|
+
"@nx/dependency-checks": ["error", { ignoredFiles: ["{projectRoot}/eslint.config.{js,cjs,mjs}"] }],
|
|
10
10
|
},
|
|
11
|
-
languageOptions: { parser: require(
|
|
11
|
+
languageOptions: { parser: require("jsonc-eslint-parser") },
|
|
12
12
|
},
|
|
13
|
-
...nx.configs[
|
|
14
|
-
...nx.configs[
|
|
13
|
+
...nx.configs["flat/angular"],
|
|
14
|
+
...nx.configs["flat/angular-template"],
|
|
15
15
|
{
|
|
16
|
-
files: [
|
|
16
|
+
files: ["**/*.ts"],
|
|
17
17
|
rules: {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
"@angular-eslint/directive-selector": [
|
|
19
|
+
"error",
|
|
20
20
|
{
|
|
21
|
-
type:
|
|
22
|
-
prefix:
|
|
23
|
-
style:
|
|
21
|
+
type: "attribute",
|
|
22
|
+
prefix: "ssv",
|
|
23
|
+
style: "camelCase",
|
|
24
24
|
},
|
|
25
25
|
],
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
"@angular-eslint/component-selector": [
|
|
27
|
+
"error",
|
|
28
28
|
{
|
|
29
|
-
type:
|
|
30
|
-
prefix:
|
|
31
|
-
style:
|
|
29
|
+
type: "element",
|
|
30
|
+
prefix: "ssv",
|
|
31
|
+
style: "kebab-case",
|
|
32
32
|
},
|
|
33
33
|
],
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
"@angular-eslint/directive-selector": "off",
|
|
35
|
+
"@angular-eslint/no-input-rename": "off",
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
files: [
|
|
39
|
+
files: ["**/*.html"],
|
|
40
40
|
// Override or add rules here
|
|
41
41
|
rules: {},
|
|
42
42
|
},
|
package/jest.config.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
displayName:
|
|
3
|
-
preset:
|
|
4
|
-
setupFilesAfterEnv: [
|
|
5
|
-
coverageDirectory:
|
|
2
|
+
displayName: "@ssv/ngx.command",
|
|
3
|
+
preset: "../../jest.preset.js",
|
|
4
|
+
setupFilesAfterEnv: ["<rootDir>/src/test-setup.ts"],
|
|
5
|
+
coverageDirectory: "../../coverage/libs/ngx.command",
|
|
6
6
|
transform: {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
"^.+\\.(ts|mjs|js|html)$": [
|
|
8
|
+
"jest-preset-angular",
|
|
9
9
|
{
|
|
10
|
-
tsconfig:
|
|
11
|
-
stringifyContentPathRegex:
|
|
10
|
+
tsconfig: "<rootDir>/tsconfig.spec.json",
|
|
11
|
+
stringifyContentPathRegex: "\\.(html|svg)$",
|
|
12
12
|
},
|
|
13
13
|
],
|
|
14
14
|
},
|
|
15
|
-
transformIgnorePatterns: [
|
|
15
|
+
transformIgnorePatterns: ["node_modules/(?!.*\\.mjs$)"],
|
|
16
16
|
snapshotSerializers: [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
"jest-preset-angular/build/serializers/no-ng-attributes",
|
|
18
|
+
"jest-preset-angular/build/serializers/ng-snapshot",
|
|
19
|
+
"jest-preset-angular/build/serializers/html-comment",
|
|
20
20
|
],
|
|
21
21
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ssv/ngx.command",
|
|
3
|
-
"version": "3.0.0-dev.
|
|
3
|
+
"version": "3.0.0-dev.32",
|
|
4
4
|
"versionSuffix": "",
|
|
5
5
|
"description": "Command pattern implementation for angular. Command used to encapsulate information which is needed to perform an action.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"sketch7",
|
|
8
8
|
"ngx",
|
|
9
|
-
"angular17",
|
|
10
9
|
"angular",
|
|
11
10
|
"ssv",
|
|
12
11
|
"command",
|
|
@@ -18,7 +17,7 @@
|
|
|
18
17
|
"private": false,
|
|
19
18
|
"repository": {
|
|
20
19
|
"type": "git",
|
|
21
|
-
"url": "https://github.com/sketch7/ngx.
|
|
20
|
+
"url": "https://github.com/sketch7/ssv.ngx.git"
|
|
22
21
|
},
|
|
23
22
|
"dependencies": {},
|
|
24
23
|
"peerDependencies": {
|
package/src/command.options.ts
CHANGED
|
@@ -28,18 +28,22 @@ export const COMMAND_OPTIONS = new InjectionToken<CommandOptions>("SSV_COMMAND_O
|
|
|
28
28
|
factory: () => DEFAULT_OPTIONS,
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
export function provideSsvCommandOptions(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
? {
|
|
35
|
-
...DEFAULT_OPTIONS,
|
|
36
|
-
...opts,
|
|
37
|
-
}
|
|
38
|
-
: DEFAULT_OPTIONS;
|
|
31
|
+
export function provideSsvCommandOptions(
|
|
32
|
+
options: Partial<CommandOptions> | ((defaults: Readonly<CommandOptions>) => Partial<CommandOptions>)
|
|
33
|
+
): EnvironmentProviders {
|
|
39
34
|
return makeEnvironmentProviders([
|
|
40
35
|
{
|
|
41
|
-
provide:
|
|
42
|
-
|
|
36
|
+
provide: COMMAND_OPTIONS,
|
|
37
|
+
useFactory: () => {
|
|
38
|
+
let opts = typeof options === "function" ? options(DEFAULT_OPTIONS) : options;
|
|
39
|
+
opts = opts
|
|
40
|
+
? {
|
|
41
|
+
...DEFAULT_OPTIONS,
|
|
42
|
+
...opts,
|
|
43
|
+
}
|
|
44
|
+
: DEFAULT_OPTIONS;
|
|
45
|
+
return opts;
|
|
46
|
+
},
|
|
43
47
|
},
|
|
44
48
|
]);
|
|
45
49
|
}
|
package/src/test-setup.ts
CHANGED
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "3.0.0-dev.
|
|
1
|
+
export const VERSION = "3.0.0-dev.32";
|