@voiceflow/common 7.12.1 → 7.13.3
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,4 +1,10 @@
|
|
|
1
|
+
import { AsyncActionCreators, Meta } from 'typescript-fsa';
|
|
2
|
+
export interface AsyncError<C extends number = never> {
|
|
3
|
+
message: string;
|
|
4
|
+
code?: C;
|
|
5
|
+
}
|
|
1
6
|
export declare const createAction: import("typescript-fsa").ActionCreatorFactory;
|
|
7
|
+
export declare const createAsyncAction: <P, R, E extends AsyncError<number> = AsyncError<never>>(type: string, commonMeta?: Meta | undefined) => AsyncActionCreators<P, R, E>;
|
|
2
8
|
export declare const typeFactory: (...parts: string[]) => (name: string) => string;
|
|
3
9
|
export declare class Channel<K extends string> {
|
|
4
10
|
variables: K[];
|
|
@@ -3,9 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createChannel = exports.Channel = exports.typeFactory = exports.createAction = void 0;
|
|
6
|
+
exports.createChannel = exports.Channel = exports.typeFactory = exports.createAsyncAction = exports.createAction = void 0;
|
|
7
7
|
const typescript_fsa_1 = __importDefault(require("typescript-fsa"));
|
|
8
8
|
exports.createAction = typescript_fsa_1.default();
|
|
9
|
+
const createAsyncAction = (type, commonMeta) => exports.createAction.async(type, commonMeta);
|
|
10
|
+
exports.createAsyncAction = createAsyncAction;
|
|
9
11
|
const typeFactory = (...parts) => (name) => [...parts, name].join('.');
|
|
10
12
|
exports.typeFactory = typeFactory;
|
|
11
13
|
class Channel {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/utils/protocol.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["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C;AAAlI,QAAA,aAAa,iBAAqH"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { AsyncActionCreators, Meta } from 'typescript-fsa';
|
|
2
|
+
export interface AsyncError<C extends number = never> {
|
|
3
|
+
message: string;
|
|
4
|
+
code?: C;
|
|
5
|
+
}
|
|
1
6
|
export declare const createAction: import("typescript-fsa").ActionCreatorFactory;
|
|
7
|
+
export declare const createAsyncAction: <P, R, E extends AsyncError<number> = AsyncError<never>>(type: string, commonMeta?: Meta | undefined) => AsyncActionCreators<P, R, E>;
|
|
2
8
|
export declare const typeFactory: (...parts: string[]) => (name: string) => string;
|
|
3
9
|
export declare class Channel<K extends string> {
|
|
4
10
|
variables: K[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import actionCreatorFactory from 'typescript-fsa';
|
|
2
2
|
export const createAction = actionCreatorFactory();
|
|
3
|
+
export const createAsyncAction = (type, commonMeta) => createAction.async(type, commonMeta);
|
|
3
4
|
export const typeFactory = (...parts) => (name) => [...parts, name].join('.');
|
|
4
5
|
export class Channel {
|
|
5
6
|
constructor(variables, build) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/utils/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/utils/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAmD,MAAM,gBAAgB,CAAC;AAOjF,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,EAAE,CAAC;AAEnD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAkD,IAAY,EAAE,UAAiB,EAAgC,EAAE,CAClJ,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AAEvC,MAAM,CAAC,MAAM,WAAW,GACtB,CAAC,GAAG,KAAe,EAAE,EAAE,CACvB,CAAC,IAAY,EAAU,EAAE,CACvB,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/B,MAAM,OAAO,OAAO;IAClB,YAAmB,SAAc,EAAS,KAA4C;QAAnE,cAAS,GAAT,SAAS,CAAK;QAAS,UAAK,GAAL,KAAK,CAAuC;IAAG,CAAC;IAE1F,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC,EAAE,EAAuB,CAAC,CAAC,CAAC;IAC5H,CAAC;IAED,MAAM,CAAmB,SAAc,EAAE,KAA4C;QACnF,OAAO,IAAI,OAAO,CAAQ,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACrH,CAAC;CACF;AAID,MAAM,CAAC,MAAM,aAAa,GAAG,CAAmB,SAAc,EAAE,KAA4C,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceflow/common",
|
|
3
3
|
"description": "Junk drawer of utility functions",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.13.3",
|
|
5
5
|
"author": "Voiceflow",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/voiceflow/libs/issues"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"chai-as-promised": "^7.1.1",
|
|
31
31
|
"depcheck": "^1.4.1",
|
|
32
32
|
"lint-staged": "^11.0.0",
|
|
33
|
-
"mocha": "
|
|
33
|
+
"mocha": "9.1.3",
|
|
34
34
|
"nyc": "^15.1.0",
|
|
35
35
|
"rimraf": "^3.0.2",
|
|
36
36
|
"ts-mocha": "^8.0.0",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"test:single": "NODE_ENV=test ts-mocha --paths --config config/tests/mocharc.yml",
|
|
74
74
|
"test:unit": "NODE_ENV=test nyc --report-dir=nyc_coverage_unit ts-mocha --paths --config config/tests/mocharc.yml 'tests/**/*.unit.ts'"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "f262383067d86befc5b1cbb36d1b962fbab0641a"
|
|
77
77
|
}
|