@cascateer/core 2.4.1 → 2.4.4

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.
@@ -8,3 +8,4 @@ on:
8
8
  jobs:
9
9
  call-workflow:
10
10
  uses: cascateer/lib/.github/workflows/publish.yml@main
11
+ secrets: inherit
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@cascateer/core",
3
- "version": "2.4.1",
3
+ "version": "2.4.4",
4
4
  "repository": {
5
5
  "type": "git",
6
- "url": "https://github.com/cascateer/core.git"
6
+ "url": "git+https://github.com/cascateer/core.git"
7
7
  },
8
8
  "scripts": {
9
- "patch": "npm version patch && git push origin main --tags",
9
+ "semver-patch": "npm version patch && git push origin main --tags",
10
10
  "update": "npm cache clean --force && npx npm-check-updates -u && npm i",
11
11
  "test": "vitest"
12
12
  },
@@ -19,13 +19,13 @@
19
19
  "devDependencies": {
20
20
  "@types/lodash": "^4.17.24",
21
21
  "@types/object-hash": "^3.0.6",
22
- "@types/react": "^19.2.16",
22
+ "@types/react": "^19.2.17",
23
23
  "typescript": "~6.0.3",
24
24
  "vite": "^8.0.16",
25
- "vitest": "^4.1.8"
25
+ "vitest": "^4.1.9"
26
26
  },
27
27
  "dependencies": {
28
- "@cascateer/lib": "^1.0.4",
28
+ "@cascateer/lib": "^1.0.9",
29
29
  "lodash": "^4.18.1",
30
30
  "object-hash": "^3.0.0",
31
31
  "rxjs": "^7.8.2",
package/src/fragment.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { asArray, asObservable } from "@cascateer/lib";
2
+ import { flatMap } from "@cascateer/lib/operators";
2
3
  import { tap } from "lodash";
3
4
  import {
4
5
  combineLatest,
@@ -13,7 +14,6 @@ import {
13
14
  Subscription,
14
15
  switchMap,
15
16
  } from "rxjs";
16
- import { flatMap } from "./operators";
17
17
 
18
18
  export type Leaf =
19
19
  | string
package/src/multicast.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { property } from "@cascateer/lib";
2
+ import { flatMap } from "@cascateer/lib/operators";
2
3
  import { partition, thru, uniq, uniqBy } from "lodash";
3
4
  import {
4
5
  distinct,
@@ -15,7 +16,6 @@ import { v4 } from "uuid";
15
16
  import {
16
17
  accumulate,
17
18
  exchangeWith,
18
- flatMap,
19
19
  MulticastActionMessage,
20
20
  MulticastClientMessage,
21
21
  proxyReplaySubject,
@@ -1,7 +1,6 @@
1
1
  export { accumulate } from "./accumulate";
2
2
  export { every } from "./every";
3
3
  export { exchangeWith } from "./exchangeWith";
4
- export { flatMap } from "./flatMap";
5
4
  export {
6
5
  multicast,
7
6
  type MulticastAction,
package/src/store.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { EndoFunction, ExtendableDictionary } from "@cascateer/lib";
2
+ import { flatMap } from "@cascateer/lib/operators";
2
3
  import { constant, Dictionary, mapValues, tap, thru } from "lodash";
3
4
  import {
4
5
  identity,
@@ -9,12 +10,7 @@ import {
9
10
  shareReplay,
10
11
  UnaryFunction,
11
12
  } from "rxjs";
12
- import {
13
- flatMap,
14
- MulticastAction,
15
- MulticastSubject,
16
- sequence,
17
- } from "./operators";
13
+ import { MulticastAction, MulticastSubject, sequence } from "./operators";
18
14
  import { Serializable } from "./serializable";
19
15
  import { ComputedSignal, Signal } from "./signal";
20
16
  import { Action } from "./types";
@@ -1,36 +0,0 @@
1
- name: Publish to NPM
2
-
3
- on:
4
- workflow_call:
5
- push:
6
- tags:
7
- - "v*"
8
-
9
- jobs:
10
- publish:
11
- runs-on: ubuntu-latest
12
- permissions:
13
- contents: write
14
- id-token: write
15
-
16
- steps:
17
- - uses: actions/checkout@v6
18
- - uses: actions/setup-node@v6
19
- with:
20
- node-version: "24"
21
- registry-url: "https://registry.npmjs.org"
22
-
23
- - name: Verify version matches tag
24
- run: |
25
- TAG="${GITHUB_REF#refs/tags/}"
26
- VERSION="${TAG#v}"
27
- FILE_VERSION=$(node -p "require('./package.json').version")
28
- if [ "$VERSION" != "$FILE_VERSION" ]; then
29
- echo "Version mismatch: tag=$VERSION, package.json=$FILE_VERSION"
30
- exit 1
31
- fi
32
-
33
- - name: Publish to NPM
34
- env:
35
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36
- run: npm publish --access public --provenance
@@ -1,11 +0,0 @@
1
- import { OperatorFunction, from, map, mergeMap } from "rxjs";
2
-
3
- export const flatMap =
4
- <T, U>(
5
- project: (value: T, index: number) => U | U[],
6
- ): OperatorFunction<T, U> =>
7
- (source) =>
8
- source.pipe(
9
- map(project),
10
- mergeMap((value) => from(Array.isArray(value) ? value : [value])),
11
- );