@kwiz/node 1.0.69 → 1.0.72
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/.vscode/settings.json
CHANGED
|
@@ -10,10 +10,13 @@ export declare const apiResponseHeaders: {
|
|
|
10
10
|
html: {
|
|
11
11
|
'Content-Type': string;
|
|
12
12
|
};
|
|
13
|
+
noCache: {
|
|
14
|
+
"Cache-Control": string;
|
|
15
|
+
};
|
|
13
16
|
};
|
|
14
17
|
/** pass to NextResponse.json or new NextResponse */
|
|
15
18
|
export declare function HttpRespond(o?: {
|
|
16
|
-
/** true: 5 minutes, or minutes */
|
|
19
|
+
/** true: 5 minutes, or minutes, false: no-store, no value - ignored */
|
|
17
20
|
cache?: boolean | number;
|
|
18
21
|
cors?: boolean;
|
|
19
22
|
html?: boolean;
|
|
@@ -13,14 +13,19 @@ exports.apiResponseHeaders = {
|
|
|
13
13
|
}),
|
|
14
14
|
html: {
|
|
15
15
|
'Content-Type': 'text/html'
|
|
16
|
-
}
|
|
16
|
+
},
|
|
17
|
+
noCache: { "Cache-Control": "no-store" }
|
|
17
18
|
};
|
|
18
19
|
/** pass to NextResponse.json or new NextResponse */
|
|
19
20
|
function HttpRespond(o) {
|
|
20
21
|
return o ? {
|
|
21
22
|
headers: {
|
|
22
23
|
...(o?.cors ? exports.apiResponseHeaders.cors : {}),
|
|
23
|
-
...(o?.cache
|
|
24
|
+
...(o?.cache
|
|
25
|
+
? exports.apiResponseHeaders.cache(o.cache === true ? 5 : o.cache)
|
|
26
|
+
: o?.cache === false //explicitly set to false
|
|
27
|
+
? exports.apiResponseHeaders.noCache
|
|
28
|
+
: {}),
|
|
24
29
|
...(o?.html ? exports.apiResponseHeaders.html : {})
|
|
25
30
|
},
|
|
26
31
|
status: o?.status > 0 ?
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.responses.js","sourceRoot":"","sources":["../../src/next-js/api.responses.ts"],"names":[],"mappings":";;;
|
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,CAAC,CAAC,EAAE,KAAK;gBACN,CAAC,CAAC,GAAG;gBACL,CAAC,CAAC,sBAAc,CAAC,EAAE;KAC9B,CAAC,CAAC,CAAC,SAAS,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kwiz/node",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.72",
|
|
4
4
|
"description": "KWIZ utilities and helpers for node applications",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"test": "node --import tsx --test \"src/**/*.test.js\"",
|
|
22
22
|
"npm-v-patch": "npm version patch && git push origin main:main && git push --tags",
|
|
23
23
|
"npm-v-major": "npm version major && git push origin main:main && git push --tags",
|
|
24
|
-
"npm-
|
|
24
|
+
"clear-npm-cache": "npm cache clean --force",
|
|
25
25
|
"reset-repo": "git fetch origin && git reset --hard origin/main",
|
|
26
26
|
"__update-kwiz-packages": "npm install @kwiz/common@latest",
|
|
27
27
|
"link-local-common": "yalc add @kwiz/common",
|
|
@@ -29,12 +29,11 @@
|
|
|
29
29
|
"remove-all-index-files": "cd src && del /s /f /q exports-index.ts",
|
|
30
30
|
"install-packages": "npm install azurite -g && npm ci",
|
|
31
31
|
"startDevStorage": "azurite -s -l",
|
|
32
|
-
"
|
|
33
|
-
"prestart": "check-node-version --node 22"
|
|
32
|
+
"prestart": "check-node-version --node \">=22.12.0\""
|
|
34
33
|
},
|
|
35
34
|
"repository": {
|
|
36
35
|
"type": "git",
|
|
37
|
-
"url": "git+https://github.com/
|
|
36
|
+
"url": "git+https://github.com/SnapOn-Software/node.git"
|
|
38
37
|
},
|
|
39
38
|
"keywords": [
|
|
40
39
|
"KWIZ",
|
|
@@ -52,13 +51,13 @@
|
|
|
52
51
|
],
|
|
53
52
|
"license": "MIT",
|
|
54
53
|
"bugs": {
|
|
55
|
-
"url": "https://github.com/
|
|
56
|
-
"email": "support@
|
|
54
|
+
"url": "https://github.com/SnapOn-Software/node/issues",
|
|
55
|
+
"email": "support@snapon-software.com"
|
|
57
56
|
},
|
|
58
|
-
"homepage": "https://github.com/
|
|
57
|
+
"homepage": "https://github.com/SnapOn-Software/node#readme",
|
|
59
58
|
"private": false,
|
|
60
59
|
"engines": {
|
|
61
|
-
"node": ">=
|
|
60
|
+
"node": ">=22.12.0"
|
|
62
61
|
},
|
|
63
62
|
"packageManager": "npm@9.5.1",
|
|
64
63
|
"devDependencies": {
|
|
@@ -81,7 +80,7 @@
|
|
|
81
80
|
"@azure/msal-node": "^2.6.4",
|
|
82
81
|
"@azure/storage-blob": "^12.31.0",
|
|
83
82
|
"@jsforce/jsforce-node": "^3.10.14",
|
|
84
|
-
"@kwiz/common": "^1.0.
|
|
83
|
+
"@kwiz/common": "^1.0.263",
|
|
85
84
|
"axios": "^1.6.7",
|
|
86
85
|
"esbuild": "^0.19.12",
|
|
87
86
|
"get-tsconfig": "^4.7.2",
|