@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 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
- [![CI](https://github.com/sketch7/ngx.command/actions/workflows/ci.yml/badge.svg)](https://github.com/sketch7/ngx.command/actions/workflows/ci.yml)
7
5
  [![npm version](https://badge.fury.io/js/%40ssv%2Fngx.command.svg)](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('@nx/eslint-plugin');
2
- const baseConfig = require('../../eslint.config.js');
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: ['**/*.json'],
7
+ files: ["**/*.json"],
8
8
  rules: {
9
- '@nx/dependency-checks': ['error', { ignoredFiles: ['{projectRoot}/eslint.config.{js,cjs,mjs}'] }],
9
+ "@nx/dependency-checks": ["error", { ignoredFiles: ["{projectRoot}/eslint.config.{js,cjs,mjs}"] }],
10
10
  },
11
- languageOptions: { parser: require('jsonc-eslint-parser') },
11
+ languageOptions: { parser: require("jsonc-eslint-parser") },
12
12
  },
13
- ...nx.configs['flat/angular'],
14
- ...nx.configs['flat/angular-template'],
13
+ ...nx.configs["flat/angular"],
14
+ ...nx.configs["flat/angular-template"],
15
15
  {
16
- files: ['**/*.ts'],
16
+ files: ["**/*.ts"],
17
17
  rules: {
18
- '@angular-eslint/directive-selector': [
19
- 'error',
18
+ "@angular-eslint/directive-selector": [
19
+ "error",
20
20
  {
21
- type: 'attribute',
22
- prefix: 'ssv',
23
- style: 'camelCase',
21
+ type: "attribute",
22
+ prefix: "ssv",
23
+ style: "camelCase",
24
24
  },
25
25
  ],
26
- '@angular-eslint/component-selector': [
27
- 'error',
26
+ "@angular-eslint/component-selector": [
27
+ "error",
28
28
  {
29
- type: 'element',
30
- prefix: 'ssv',
31
- style: 'kebab-case',
29
+ type: "element",
30
+ prefix: "ssv",
31
+ style: "kebab-case",
32
32
  },
33
33
  ],
34
- '@angular-eslint/directive-selector': 'off',
35
- '@angular-eslint/no-input-rename': 'off',
34
+ "@angular-eslint/directive-selector": "off",
35
+ "@angular-eslint/no-input-rename": "off",
36
36
  },
37
37
  },
38
38
  {
39
- files: ['**/*.html'],
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: '@ssv/ngx.command',
3
- preset: '../../jest.preset.js',
4
- setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
5
- coverageDirectory: '../../coverage/libs/ngx.command',
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
- '^.+\\.(ts|mjs|js|html)$': [
8
- 'jest-preset-angular',
7
+ "^.+\\.(ts|mjs|js|html)$": [
8
+ "jest-preset-angular",
9
9
  {
10
- tsconfig: '<rootDir>/tsconfig.spec.json',
11
- stringifyContentPathRegex: '\\.(html|svg)$',
10
+ tsconfig: "<rootDir>/tsconfig.spec.json",
11
+ stringifyContentPathRegex: "\\.(html|svg)$",
12
12
  },
13
13
  ],
14
14
  },
15
- transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
15
+ transformIgnorePatterns: ["node_modules/(?!.*\\.mjs$)"],
16
16
  snapshotSerializers: [
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',
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.25",
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.command.git"
20
+ "url": "https://github.com/sketch7/ssv.ngx.git"
22
21
  },
23
22
  "dependencies": {},
24
23
  "peerDependencies": {
@@ -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(options: Partial<CommandOptions> | (() => Partial<CommandOptions>)): EnvironmentProviders {
32
- let opts = typeof options === "function" ? options() : options;
33
- opts = opts
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: DEFAULT_OPTIONS,
42
- useValue: opts,
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
@@ -5,4 +5,4 @@ globalThis.ngJest = {
5
5
  errorOnUnknownProperties: true,
6
6
  },
7
7
  };
8
- import 'jest-preset-angular/setup-jest';
8
+ import "jest-preset-angular/setup-jest";
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = "3.0.0-dev.25";
1
+ export const VERSION = "3.0.0-dev.32";