@qpqjs/core 0.2.0 → 0.3.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.
- package/lib/commonjs/actions/math/askRandomNumber.d.ts +4 -0
- package/lib/commonjs/actions/math/askRandomNumber.js +4 -0
- package/lib/commonjs/actions/math/askRandomNumber.js.map +1 -1
- package/lib/esm/actions/math/askRandomNumber.d.ts +4 -0
- package/lib/esm/actions/math/askRandomNumber.js +4 -0
- package/lib/esm/actions/math/askRandomNumber.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { MathActionType } from './MathActionType';
|
|
2
|
+
/**
|
|
3
|
+
* A number in [0, 1) from the platform's plain pseudo-random generator (Math.random). Not a secure source: never use
|
|
4
|
+
* it for tokens, ids or anything an attacker must not predict; use askSecureTokenGenerate or askNewGuid for those.
|
|
5
|
+
*/
|
|
2
6
|
export declare const askRandomNumber: import("../../types").ActionRequesterFunction<MathActionType, [], undefined, number, never>;
|
|
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.askRandomNumber = void 0;
|
|
4
4
|
const types_1 = require("../../types");
|
|
5
5
|
const MathActionType_1 = require("./MathActionType");
|
|
6
|
+
/**
|
|
7
|
+
* A number in [0, 1) from the platform's plain pseudo-random generator (Math.random). Not a secure source: never use
|
|
8
|
+
* it for tokens, ids or anything an attacker must not predict; use askSecureTokenGenerate or askNewGuid for those.
|
|
9
|
+
*/
|
|
6
10
|
exports.askRandomNumber = (0, types_1.createActionRequester)()({
|
|
7
11
|
actionType: MathActionType_1.MathActionType.RandomNumber,
|
|
8
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"askRandomNumber.js","sourceRoot":"","sources":["../../../../src/actions/math/askRandomNumber.ts"],"names":[],"mappings":";;;AAAA,uCAAoD;AACpD,qDAAkD;
|
|
1
|
+
{"version":3,"file":"askRandomNumber.js","sourceRoot":"","sources":["../../../../src/actions/math/askRandomNumber.ts"],"names":[],"mappings":";;;AAAA,uCAAoD;AACpD,qDAAkD;AAElD;;;GAGG;AACU,QAAA,eAAe,GAAG,IAAA,6BAAqB,GAAU,CAAC;IAC7D,UAAU,EAAE,+BAAc,CAAC,YAAY;CACxC,CAAC,CAAC","sourcesContent":["import { createActionRequester } from '../../types';\nimport { MathActionType } from './MathActionType';\n\n/**\n * A number in [0, 1) from the platform's plain pseudo-random generator (Math.random). Not a secure source: never use\n * it for tokens, ids or anything an attacker must not predict; use askSecureTokenGenerate or askNewGuid for those.\n */\nexport const askRandomNumber = createActionRequester<number>()({\n actionType: MathActionType.RandomNumber,\n});\n"]}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { MathActionType } from './MathActionType';
|
|
2
|
+
/**
|
|
3
|
+
* A number in [0, 1) from the platform's plain pseudo-random generator (Math.random). Not a secure source: never use
|
|
4
|
+
* it for tokens, ids or anything an attacker must not predict; use askSecureTokenGenerate or askNewGuid for those.
|
|
5
|
+
*/
|
|
2
6
|
export declare const askRandomNumber: import("../../types").ActionRequesterFunction<MathActionType, [], undefined, number, never>;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { createActionRequester } from '../../types';
|
|
2
2
|
import { MathActionType } from './MathActionType';
|
|
3
|
+
/**
|
|
4
|
+
* A number in [0, 1) from the platform's plain pseudo-random generator (Math.random). Not a secure source: never use
|
|
5
|
+
* it for tokens, ids or anything an attacker must not predict; use askSecureTokenGenerate or askNewGuid for those.
|
|
6
|
+
*/
|
|
3
7
|
export const askRandomNumber = createActionRequester()({
|
|
4
8
|
actionType: MathActionType.RandomNumber,
|
|
5
9
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"askRandomNumber.js","sourceRoot":"","sources":["../../../../src/actions/math/askRandomNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,eAAe,GAAG,qBAAqB,EAAU,CAAC;IAC7D,UAAU,EAAE,cAAc,CAAC,YAAY;CACxC,CAAC,CAAC","sourcesContent":["import { createActionRequester } from '../../types';\nimport { MathActionType } from './MathActionType';\n\nexport const askRandomNumber = createActionRequester<number>()({\n actionType: MathActionType.RandomNumber,\n});\n"]}
|
|
1
|
+
{"version":3,"file":"askRandomNumber.js","sourceRoot":"","sources":["../../../../src/actions/math/askRandomNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,qBAAqB,EAAU,CAAC;IAC7D,UAAU,EAAE,cAAc,CAAC,YAAY;CACxC,CAAC,CAAC","sourcesContent":["import { createActionRequester } from '../../types';\nimport { MathActionType } from './MathActionType';\n\n/**\n * A number in [0, 1) from the platform's plain pseudo-random generator (Math.random). Not a secure source: never use\n * it for tokens, ids or anything an attacker must not predict; use askSecureTokenGenerate or askNewGuid for those.\n */\nexport const askRandomNumber = createActionRequester<number>()({\n actionType: MathActionType.RandomNumber,\n});\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qpqjs/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"homepage": "https://github.com/qpqjs/quidproquo#readme",
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^24.2.1",
|
|
39
|
-
"@qpqjs/tsconfig": "0.
|
|
39
|
+
"@qpqjs/tsconfig": "0.3.0",
|
|
40
40
|
"typescript": "^5.8.2"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|