anbaric-state-machine 1.25.0 → 1.26.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotifierFactory.d.ts","sourceRoot":"","sources":["../../src/notifications/NotifierFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"NotifierFactory.d.ts","sourceRoot":"","sources":["../../src/notifications/NotifierFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAQvC,QAAA,MAAM,eAAe;IAEjB,QAAQ,IAAK,QAAQ,GAAG,SAAS;CASpC,CAAA;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { CloudNotifier } from "anbaric-impl-cloud";
|
|
2
|
+
/* Like the other services, the notifier is chosen by environment. There is no
|
|
3
|
+
local implementation - nothing can be delivered from a laptop - so with no
|
|
4
|
+
env a machine simply doesn't notify. Deployed, the platform sets
|
|
5
|
+
ANBARIC_NOTIFIER_TYPE=cloud and the app posts to the platform, which owns
|
|
6
|
+
delivery. */
|
|
7
7
|
const NotifierFactory = {
|
|
8
|
-
use(notifier) {
|
|
9
|
-
registered = notifier;
|
|
10
|
-
},
|
|
11
8
|
instance() {
|
|
12
|
-
|
|
9
|
+
switch (process.env.ANBARIC_NOTIFIER_TYPE) {
|
|
10
|
+
case "cloud":
|
|
11
|
+
return new CloudNotifier();
|
|
12
|
+
default:
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
13
15
|
},
|
|
14
16
|
};
|
|
15
17
|
export { NotifierFactory };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotifierFactory.js","sourceRoot":"","sources":["../../src/notifications/NotifierFactory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NotifierFactory.js","sourceRoot":"","sources":["../../src/notifications/NotifierFactory.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAEjD;;;;eAIe;AACf,MAAM,eAAe,GAAG;IAEpB,QAAQ;QACJ,QAAQ,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,CAAC;YACxC,KAAK,OAAO;gBACR,OAAO,IAAI,aAAa,EAAE,CAAC;YAC/B;gBACI,OAAO,SAAS,CAAC;QACzB,CAAC;IACL,CAAC;CAEJ,CAAA;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anbaric-state-machine",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"description": "This is the state machine library that one can use to add state management to an application. It will, by default, be locally runnable but can deployed to the Anbaric Cloud via the CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "chris@anbaric.ai",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"typescript": "^7.0.2"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"anbaric-impl-cloud": "^1.
|
|
28
|
-
"anbaric-tsapi": "^1.
|
|
27
|
+
"anbaric-impl-cloud": "^1.26.0",
|
|
28
|
+
"anbaric-tsapi": "^1.26.0"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"dist"
|