@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.
- package/.github/workflows/publish.yml +1 -0
- package/package.json +6 -6
- package/src/fragment.ts +1 -1
- package/src/multicast.ts +1 -1
- package/src/operators/index.ts +0 -1
- package/src/store.ts +2 -6
- package/.github/workflows/publish2.yml +0 -36
- package/src/operators/flatMap.ts +0 -11
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cascateer/core",
|
|
3
|
-
"version": "2.4.
|
|
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.
|
|
22
|
+
"@types/react": "^19.2.17",
|
|
23
23
|
"typescript": "~6.0.3",
|
|
24
24
|
"vite": "^8.0.16",
|
|
25
|
-
"vitest": "^4.1.
|
|
25
|
+
"vitest": "^4.1.9"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@cascateer/lib": "^1.0.
|
|
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,
|
package/src/operators/index.ts
CHANGED
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
|
package/src/operators/flatMap.ts
DELETED
|
@@ -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
|
-
);
|