@drmhse/authos-vue 0.1.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/dist/chokidar-KYB2GOYG.mjs +1730 -0
- package/dist/chunk-6DZX6EAA.mjs +33 -0
- package/dist/chunk-C2J6NSID.mjs +103 -0
- package/dist/chunk-F6BPUSH3.mjs +452 -0
- package/dist/chunk-JLL4L3HM.mjs +66 -0
- package/dist/chunk-OGRUDANK.mjs +28 -0
- package/dist/chunk-QGSFJDIC.mjs +1272 -0
- package/dist/chunk-SW2YRXFK.mjs +408 -0
- package/dist/chunk-T2K7EIWY.mjs +18 -0
- package/dist/chunk-VCTSSS2F.mjs +741 -0
- package/dist/chunk-XLWXQZHO.mjs +3602 -0
- package/dist/chunk-Z2UOP6GF.mjs +986 -0
- package/dist/dist-CX347IU5.mjs +12545 -0
- package/dist/dist-KTGFCHLE.mjs +3 -0
- package/dist/index.d.mts +269 -0
- package/dist/index.d.ts +269 -0
- package/dist/index.js +562 -0
- package/dist/index.mjs +511 -0
- package/dist/json5-WAUASGCX.mjs +3 -0
- package/dist/jsonc-BXVTKCPI.mjs +3 -0
- package/dist/multipart-parser-ZINPIK62.mjs +173 -0
- package/dist/nuxt.d.mts +15 -0
- package/dist/nuxt.d.ts +15 -0
- package/dist/nuxt.js +10527 -0
- package/dist/nuxt.mjs +7988 -0
- package/dist/prompt-LQK3IVQK.mjs +751 -0
- package/dist/toml-EIVFNDS7.mjs +3 -0
- package/dist/utils-ITGQWSRY.mjs +94 -0
- package/dist/yaml-NCROZBG5.mjs +3 -0
- package/package.json +76 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { serialize } from './chunk-C2J6NSID.mjs';
|
|
2
|
+
export { isEqual } from './chunk-C2J6NSID.mjs';
|
|
3
|
+
import './chunk-6DZX6EAA.mjs';
|
|
4
|
+
|
|
5
|
+
// node_modules/ohash/dist/utils/index.mjs
|
|
6
|
+
function diff(obj1, obj2) {
|
|
7
|
+
const h1 = _toHashedObject(obj1);
|
|
8
|
+
const h2 = _toHashedObject(obj2);
|
|
9
|
+
return _diff(h1, h2);
|
|
10
|
+
}
|
|
11
|
+
function _diff(h1, h2) {
|
|
12
|
+
const diffs = [];
|
|
13
|
+
const allProps = /* @__PURE__ */ new Set([
|
|
14
|
+
...Object.keys(h1.props || {}),
|
|
15
|
+
...Object.keys(h2.props || {})
|
|
16
|
+
]);
|
|
17
|
+
if (h1.props && h2.props) {
|
|
18
|
+
for (const prop of allProps) {
|
|
19
|
+
const p1 = h1.props[prop];
|
|
20
|
+
const p2 = h2.props[prop];
|
|
21
|
+
if (p1 && p2) {
|
|
22
|
+
diffs.push(..._diff(h1.props?.[prop], h2.props?.[prop]));
|
|
23
|
+
} else if (p1 || p2) {
|
|
24
|
+
diffs.push(
|
|
25
|
+
new DiffEntry((p2 || p1).key, p1 ? "removed" : "added", p2, p1)
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (allProps.size === 0 && h1.hash !== h2.hash) {
|
|
31
|
+
diffs.push(new DiffEntry((h2 || h1).key, "changed", h2, h1));
|
|
32
|
+
}
|
|
33
|
+
return diffs;
|
|
34
|
+
}
|
|
35
|
+
function _toHashedObject(obj, key = "") {
|
|
36
|
+
if (obj && typeof obj !== "object") {
|
|
37
|
+
return new DiffHashedObject(key, obj, serialize(obj));
|
|
38
|
+
}
|
|
39
|
+
const props = {};
|
|
40
|
+
const hashes = [];
|
|
41
|
+
for (const _key in obj) {
|
|
42
|
+
props[_key] = _toHashedObject(obj[_key], key ? `${key}.${_key}` : _key);
|
|
43
|
+
hashes.push(props[_key].hash);
|
|
44
|
+
}
|
|
45
|
+
return new DiffHashedObject(key, obj, `{${hashes.join(":")}}`, props);
|
|
46
|
+
}
|
|
47
|
+
var DiffEntry = class {
|
|
48
|
+
constructor(key, type, newValue, oldValue) {
|
|
49
|
+
this.key = key;
|
|
50
|
+
this.type = type;
|
|
51
|
+
this.newValue = newValue;
|
|
52
|
+
this.oldValue = oldValue;
|
|
53
|
+
}
|
|
54
|
+
toString() {
|
|
55
|
+
return this.toJSON();
|
|
56
|
+
}
|
|
57
|
+
toJSON() {
|
|
58
|
+
switch (this.type) {
|
|
59
|
+
case "added": {
|
|
60
|
+
return `Added \`${this.key}\``;
|
|
61
|
+
}
|
|
62
|
+
case "removed": {
|
|
63
|
+
return `Removed \`${this.key}\``;
|
|
64
|
+
}
|
|
65
|
+
case "changed": {
|
|
66
|
+
return `Changed \`${this.key}\` from \`${this.oldValue?.toString() || "-"}\` to \`${this.newValue.toString()}\``;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
var DiffHashedObject = class {
|
|
72
|
+
constructor(key, value, hash, props) {
|
|
73
|
+
this.key = key;
|
|
74
|
+
this.value = value;
|
|
75
|
+
this.hash = hash;
|
|
76
|
+
this.props = props;
|
|
77
|
+
}
|
|
78
|
+
toString() {
|
|
79
|
+
if (this.props) {
|
|
80
|
+
return `{${Object.keys(this.props).join(",")}}`;
|
|
81
|
+
} else {
|
|
82
|
+
return JSON.stringify(this.value);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
toJSON() {
|
|
86
|
+
const k = this.key || ".";
|
|
87
|
+
if (this.props) {
|
|
88
|
+
return `${k}({${Object.keys(this.props).join(",")}})`;
|
|
89
|
+
}
|
|
90
|
+
return `${k}(${this.value})`;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export { diff };
|
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@drmhse/authos-vue",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Vue and Nuxt adapter for AuthOS authentication",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./dist/index.d.mts",
|
|
12
|
+
"default": "./dist/index.mjs"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"./nuxt": {
|
|
20
|
+
"import": {
|
|
21
|
+
"types": "./dist/nuxt.d.mts",
|
|
22
|
+
"default": "./dist/nuxt.mjs"
|
|
23
|
+
},
|
|
24
|
+
"require": {
|
|
25
|
+
"types": "./dist/nuxt.d.ts",
|
|
26
|
+
"default": "./dist/nuxt.js"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsup",
|
|
35
|
+
"dev": "tsup --watch",
|
|
36
|
+
"typecheck": "vue-tsc --noEmit",
|
|
37
|
+
"lint": "eslint src --ext .ts,.vue",
|
|
38
|
+
"test:ct": "playwright test -c playwright-ct.config.ts --reporter=list",
|
|
39
|
+
"prepublishOnly": "npm run build"
|
|
40
|
+
},
|
|
41
|
+
"keywords": [
|
|
42
|
+
"authos",
|
|
43
|
+
"auth",
|
|
44
|
+
"authentication",
|
|
45
|
+
"vue",
|
|
46
|
+
"nuxt",
|
|
47
|
+
"oauth",
|
|
48
|
+
"sso"
|
|
49
|
+
],
|
|
50
|
+
"author": "DRM HSE <info@drmhse.com>",
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"vue": ">=3.4.0"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@playwright/experimental-ct-vue": "^1.48.0",
|
|
57
|
+
"@playwright/test": "^1.48.0",
|
|
58
|
+
"@types/node": "^25.0.3",
|
|
59
|
+
"nuxt": "^3.14.0",
|
|
60
|
+
"tsup": "^8.3.5",
|
|
61
|
+
"typescript": "^5.7.2",
|
|
62
|
+
"vue": "^3.5.13",
|
|
63
|
+
"vue-tsc": "^2.2.0"
|
|
64
|
+
},
|
|
65
|
+
"repository": {
|
|
66
|
+
"type": "git",
|
|
67
|
+
"url": "https://github.com/drmhse/sso.git",
|
|
68
|
+
"directory": "packages/authos-vue"
|
|
69
|
+
},
|
|
70
|
+
"publishConfig": {
|
|
71
|
+
"access": "public"
|
|
72
|
+
},
|
|
73
|
+
"dependencies": {
|
|
74
|
+
"@drmhse/sso-sdk": "^0.3.4"
|
|
75
|
+
}
|
|
76
|
+
}
|