@fedify/vocab 2.1.0-dev.536 → 2.1.0-dev.565
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/deno.json +1 -1
- package/dist/accept.yaml +1 -0
- package/dist/activity.yaml +1 -0
- package/dist/actor.test.js +5 -5
- package/dist/add.yaml +1 -0
- package/dist/announce.yaml +1 -0
- package/dist/announceauthorization.yaml +40 -0
- package/dist/announcerequest.yaml +24 -0
- package/dist/application.yaml +1 -0
- package/dist/arrive.yaml +1 -0
- package/dist/article.yaml +1 -0
- package/dist/audio.yaml +1 -0
- package/dist/block.yaml +1 -0
- package/dist/chatmessage.yaml +1 -0
- package/dist/collection.yaml +1 -0
- package/dist/collectionpage.yaml +1 -0
- package/dist/create.yaml +1 -0
- package/dist/delete.yaml +1 -0
- package/dist/{deno-DtLTceue.js → deno-D6ZtKO2-.js} +2 -2
- package/dist/dislike.yaml +1 -0
- package/dist/document.yaml +1 -0
- package/dist/emojireact.yaml +1 -0
- package/dist/event.yaml +1 -0
- package/dist/flag.yaml +1 -0
- package/dist/follow.yaml +1 -0
- package/dist/group.yaml +1 -0
- package/dist/ignore.yaml +1 -0
- package/dist/image.yaml +4 -1
- package/dist/interactionpolicy.yaml +54 -0
- package/dist/interactionrule.yaml +50 -0
- package/dist/intransitiveactivity.yaml +1 -0
- package/dist/invite.yaml +1 -0
- package/dist/join.yaml +1 -0
- package/dist/leave.yaml +1 -0
- package/dist/like.yaml +1 -0
- package/dist/likeauthorization.yaml +39 -0
- package/dist/likerequest.yaml +23 -0
- package/dist/listen.yaml +1 -0
- package/dist/lookup.test.js +7 -6
- package/dist/mod.cjs +3924 -405
- package/dist/mod.d.cts +2154 -1
- package/dist/mod.d.ts +2154 -1
- package/dist/mod.js +3917 -406
- package/dist/move.yaml +1 -0
- package/dist/note.yaml +1 -0
- package/dist/object.yaml +61 -0
- package/dist/offer.yaml +1 -0
- package/dist/orderedcollection.yaml +1 -0
- package/dist/orderedcollectionpage.yaml +1 -0
- package/dist/organization.yaml +1 -0
- package/dist/page.yaml +1 -0
- package/dist/person.yaml +1 -0
- package/dist/place.yaml +1 -0
- package/dist/profile.yaml +1 -0
- package/dist/question.yaml +1 -0
- package/dist/read.yaml +1 -0
- package/dist/reject.yaml +1 -0
- package/dist/relationship.yaml +1 -0
- package/dist/remove.yaml +1 -0
- package/dist/replyauthorization.yaml +39 -0
- package/dist/replyrequest.yaml +23 -0
- package/dist/service.yaml +1 -0
- package/dist/tentativeaccept.yaml +1 -0
- package/dist/tentativereject.yaml +1 -0
- package/dist/tombstone.yaml +1 -0
- package/dist/travel.yaml +1 -0
- package/dist/type.test.js +3 -2
- package/dist/undo.yaml +1 -0
- package/dist/update.yaml +1 -0
- package/dist/video.yaml +1 -0
- package/dist/view.yaml +1 -0
- package/dist/{vocab-DNa6QysH.js → vocab-DErmegmL.js} +6904 -9618
- package/dist/vocab.test.js +15 -5
- package/package.json +4 -4
- package/src/__snapshots__/vocab.test.ts.snap +1756 -34
- package/src/accept.yaml +1 -0
- package/src/activity.yaml +1 -0
- package/src/add.yaml +1 -0
- package/src/announce.yaml +1 -0
- package/src/announceauthorization.yaml +40 -0
- package/src/announcerequest.yaml +24 -0
- package/src/application.yaml +1 -0
- package/src/arrive.yaml +1 -0
- package/src/article.yaml +1 -0
- package/src/audio.yaml +1 -0
- package/src/block.yaml +1 -0
- package/src/chatmessage.yaml +1 -0
- package/src/collection.yaml +1 -0
- package/src/collectionpage.yaml +1 -0
- package/src/create.yaml +1 -0
- package/src/delete.yaml +1 -0
- package/src/dislike.yaml +1 -0
- package/src/document.yaml +1 -0
- package/src/emojireact.yaml +1 -0
- package/src/event.yaml +1 -0
- package/src/flag.yaml +1 -0
- package/src/follow.yaml +1 -0
- package/src/group.yaml +1 -0
- package/src/ignore.yaml +1 -0
- package/src/image.yaml +4 -1
- package/src/interactionpolicy.yaml +54 -0
- package/src/interactionrule.yaml +50 -0
- package/src/intransitiveactivity.yaml +1 -0
- package/src/invite.yaml +1 -0
- package/src/join.yaml +1 -0
- package/src/leave.yaml +1 -0
- package/src/like.yaml +1 -0
- package/src/likeauthorization.yaml +39 -0
- package/src/likerequest.yaml +23 -0
- package/src/listen.yaml +1 -0
- package/src/move.yaml +1 -0
- package/src/note.yaml +1 -0
- package/src/object.yaml +61 -0
- package/src/offer.yaml +1 -0
- package/src/orderedcollection.yaml +1 -0
- package/src/orderedcollectionpage.yaml +1 -0
- package/src/organization.yaml +1 -0
- package/src/page.yaml +1 -0
- package/src/person.yaml +1 -0
- package/src/place.yaml +1 -0
- package/src/profile.yaml +1 -0
- package/src/question.yaml +1 -0
- package/src/read.yaml +1 -0
- package/src/reject.yaml +1 -0
- package/src/relationship.yaml +1 -0
- package/src/remove.yaml +1 -0
- package/src/replyauthorization.yaml +39 -0
- package/src/replyrequest.yaml +23 -0
- package/src/service.yaml +1 -0
- package/src/tentativeaccept.yaml +1 -0
- package/src/tentativereject.yaml +1 -0
- package/src/tombstone.yaml +1 -0
- package/src/travel.yaml +1 -0
- package/src/undo.yaml +1 -0
- package/src/update.yaml +1 -0
- package/src/video.yaml +1 -0
- package/src/view.yaml +1 -0
- package/src/vocab.test.ts +7 -1
- package/tsdown.config.ts +1 -1
- package/dist/chunk-BeeFIeNn.js +0 -45
- package/dist/execAsync-Bj-9hhe9.js +0 -17
- package/dist/getMachineId-bsd-JZpH2DVB.js +0 -34
- package/dist/getMachineId-darwin-CIJUQhqg.js +0 -30
- package/dist/getMachineId-linux-l0DNcix-.js +0 -27
- package/dist/getMachineId-unsupported-DFK1bZgt.js +0 -20
- package/dist/getMachineId-win-B0bq2tSf.js +0 -32
- /package/dist/{type-Dnf0m2yO.js → type-CNuABalk.js} +0 -0
- /package/dist/{utils-Dm0Onkcz.js → utils-BSWXlrig.js} +0 -0
package/src/question.yaml
CHANGED
|
@@ -17,6 +17,7 @@ defaultContext:
|
|
|
17
17
|
- "https://w3id.org/identity/v1"
|
|
18
18
|
- "https://www.w3.org/ns/activitystreams"
|
|
19
19
|
- "https://w3id.org/security/data-integrity/v1"
|
|
20
|
+
- "https://gotosocial.org/ns"
|
|
20
21
|
- toot: "http://joinmastodon.org/ns#"
|
|
21
22
|
misskey: "https://misskey-hub.net/ns#"
|
|
22
23
|
fedibird: "http://fedibird.com/ns#"
|
package/src/read.yaml
CHANGED
package/src/reject.yaml
CHANGED
package/src/relationship.yaml
CHANGED
package/src/remove.yaml
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
$schema: ../../vocab-tools/schema.yaml
|
|
2
|
+
name: ReplyAuthorization
|
|
3
|
+
compactName: ReplyAuthorization
|
|
4
|
+
uri: "https://gotosocial.org/ns#ReplyAuthorization"
|
|
5
|
+
extends: "https://www.w3.org/ns/activitystreams#Object"
|
|
6
|
+
entity: true
|
|
7
|
+
description: |
|
|
8
|
+
Proves that a reply interaction has been approved by the post author.
|
|
9
|
+
|
|
10
|
+
This object is dereferenceable and is used by third parties to verify
|
|
11
|
+
that a reply was authorized. The `attributedTo` property identifies
|
|
12
|
+
the post author who granted the approval.
|
|
13
|
+
|
|
14
|
+
See [GoToSocial interaction controls](https://docs.gotosocial.org/en/latest/federation/interaction_controls/)
|
|
15
|
+
for details.
|
|
16
|
+
defaultContext:
|
|
17
|
+
- "https://www.w3.org/ns/activitystreams"
|
|
18
|
+
- "https://w3id.org/security/data-integrity/v1"
|
|
19
|
+
- "https://gotosocial.org/ns"
|
|
20
|
+
|
|
21
|
+
properties:
|
|
22
|
+
- singularName: interactingObject
|
|
23
|
+
functional: true
|
|
24
|
+
compactName: interactingObject
|
|
25
|
+
uri: "https://gotosocial.org/ns#interactingObject"
|
|
26
|
+
description: |
|
|
27
|
+
The URI of the reply object (e.g., a {@link Note}) that has been
|
|
28
|
+
authorized.
|
|
29
|
+
range:
|
|
30
|
+
- "https://www.w3.org/ns/activitystreams#Object"
|
|
31
|
+
|
|
32
|
+
- singularName: interactionTarget
|
|
33
|
+
functional: true
|
|
34
|
+
compactName: interactionTarget
|
|
35
|
+
uri: "https://gotosocial.org/ns#interactionTarget"
|
|
36
|
+
description: |
|
|
37
|
+
The URI of the post that is the target of the authorized reply.
|
|
38
|
+
range:
|
|
39
|
+
- "https://www.w3.org/ns/activitystreams#Object"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
$schema: ../../vocab-tools/schema.yaml
|
|
2
|
+
name: ReplyRequest
|
|
3
|
+
compactName: ReplyRequest
|
|
4
|
+
uri: "https://gotosocial.org/ns#ReplyRequest"
|
|
5
|
+
extends: "https://www.w3.org/ns/activitystreams#Activity"
|
|
6
|
+
entity: true
|
|
7
|
+
description: |
|
|
8
|
+
A request to reply to a post that requires approval from the post author.
|
|
9
|
+
|
|
10
|
+
The `object` property references the post to be replied to, and
|
|
11
|
+
the `instrument` property contains the reply itself (e.g., a {@link Note}).
|
|
12
|
+
|
|
13
|
+
The post author responds with an {@link Accept} (with a
|
|
14
|
+
{@link ReplyAuthorization} as `result`) or a {@link Reject}.
|
|
15
|
+
|
|
16
|
+
See [GoToSocial interaction controls](https://docs.gotosocial.org/en/latest/federation/interaction_controls/)
|
|
17
|
+
for details.
|
|
18
|
+
defaultContext:
|
|
19
|
+
- "https://w3id.org/identity/v1"
|
|
20
|
+
- "https://www.w3.org/ns/activitystreams"
|
|
21
|
+
- "https://w3id.org/security/data-integrity/v1"
|
|
22
|
+
- "https://gotosocial.org/ns"
|
|
23
|
+
properties: []
|
package/src/service.yaml
CHANGED
package/src/tentativeaccept.yaml
CHANGED
package/src/tentativereject.yaml
CHANGED
package/src/tombstone.yaml
CHANGED
package/src/travel.yaml
CHANGED
package/src/undo.yaml
CHANGED
|
@@ -19,6 +19,7 @@ defaultContext:
|
|
|
19
19
|
- "https://w3id.org/security/data-integrity/v1"
|
|
20
20
|
- "https://www.w3.org/ns/did/v1"
|
|
21
21
|
- "https://w3id.org/security/multikey/v1"
|
|
22
|
+
- "https://gotosocial.org/ns"
|
|
22
23
|
- litepub: "http://litepub.social/ns#"
|
|
23
24
|
toot: "http://joinmastodon.org/ns#"
|
|
24
25
|
EmojiReact: "litepub:EmojiReact"
|
package/src/update.yaml
CHANGED
package/src/video.yaml
CHANGED
package/src/view.yaml
CHANGED
package/src/vocab.test.ts
CHANGED
|
@@ -213,6 +213,7 @@ test("Object.toJsonLd()", async () => {
|
|
|
213
213
|
"@context": [
|
|
214
214
|
"https://www.w3.org/ns/activitystreams",
|
|
215
215
|
"https://w3id.org/security/data-integrity/v1",
|
|
216
|
+
"https://gotosocial.org/ns",
|
|
216
217
|
{
|
|
217
218
|
fedibird: "http://fedibird.com/ns#",
|
|
218
219
|
sensitive: "as:sensitive",
|
|
@@ -244,6 +245,7 @@ test("Note.toJsonLd()", async () => {
|
|
|
244
245
|
"@context": [
|
|
245
246
|
"https://www.w3.org/ns/activitystreams",
|
|
246
247
|
"https://w3id.org/security/data-integrity/v1",
|
|
248
|
+
"https://gotosocial.org/ns",
|
|
247
249
|
{
|
|
248
250
|
Emoji: "toot:Emoji",
|
|
249
251
|
Hashtag: "as:Hashtag",
|
|
@@ -387,6 +389,7 @@ test({
|
|
|
387
389
|
"https://www.w3.org/ns/activitystreams",
|
|
388
390
|
"https://w3id.org/security/v1",
|
|
389
391
|
"https://w3id.org/security/data-integrity/v1",
|
|
392
|
+
"https://gotosocial.org/ns",
|
|
390
393
|
],
|
|
391
394
|
type: "Activity",
|
|
392
395
|
object: {
|
|
@@ -620,6 +623,7 @@ test("Person.toJsonLd()", async () => {
|
|
|
620
623
|
"https://w3id.org/security/data-integrity/v1",
|
|
621
624
|
"https://www.w3.org/ns/did/v1",
|
|
622
625
|
"https://w3id.org/security/multikey/v1",
|
|
626
|
+
"https://gotosocial.org/ns",
|
|
623
627
|
{
|
|
624
628
|
PropertyValue: "schema:PropertyValue",
|
|
625
629
|
alsoKnownAs: {
|
|
@@ -1067,6 +1071,7 @@ test("Note.quoteUrl", async () => {
|
|
|
1067
1071
|
"@context": [
|
|
1068
1072
|
"https://www.w3.org/ns/activitystreams",
|
|
1069
1073
|
"https://w3id.org/security/data-integrity/v1",
|
|
1074
|
+
"https://gotosocial.org/ns",
|
|
1070
1075
|
{
|
|
1071
1076
|
Emoji: "toot:Emoji",
|
|
1072
1077
|
Hashtag: "as:Hashtag",
|
|
@@ -1206,6 +1211,7 @@ test("Place.fromJsonLd()", async () => {
|
|
|
1206
1211
|
"@context": [
|
|
1207
1212
|
"https://www.w3.org/ns/activitystreams",
|
|
1208
1213
|
"https://w3id.org/security/data-integrity/v1",
|
|
1214
|
+
"https://gotosocial.org/ns",
|
|
1209
1215
|
],
|
|
1210
1216
|
type: "Place",
|
|
1211
1217
|
name: "Fresno Area",
|
|
@@ -2288,7 +2294,7 @@ for (const typeUri in types) {
|
|
|
2288
2294
|
contextLoader: mockDocumentLoader,
|
|
2289
2295
|
});
|
|
2290
2296
|
deepStrictEqual(jsonLd["@context"], type.defaultContext);
|
|
2291
|
-
deepStrictEqual(jsonLd.id, "https://example.com/");
|
|
2297
|
+
if (type.entity) deepStrictEqual(jsonLd.id, "https://example.com/");
|
|
2292
2298
|
const restored = await cls.fromJsonLd(jsonLd, {
|
|
2293
2299
|
documentLoader: mockDocumentLoader,
|
|
2294
2300
|
contextLoader: mockDocumentLoader,
|
package/tsdown.config.ts
CHANGED
|
@@ -27,7 +27,7 @@ export default [
|
|
|
27
27
|
defineConfig({
|
|
28
28
|
entry: (await Array.fromAsync(glob(`src/**/*.test.ts`)))
|
|
29
29
|
.map((f) => f.replace(sep, "/")),
|
|
30
|
-
external: [/^node
|
|
30
|
+
external: [/^node:/, "@fedify/fixture"],
|
|
31
31
|
inputOptions: {
|
|
32
32
|
onwarn(warning, defaultHandler) {
|
|
33
33
|
if (
|
package/dist/chunk-BeeFIeNn.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
globalThis.addEventListener = () => {};
|
|
4
|
-
|
|
5
|
-
import { createRequire } from "node:module";
|
|
6
|
-
|
|
7
|
-
//#region rolldown:runtime
|
|
8
|
-
var __create = Object.create;
|
|
9
|
-
var __defProp = Object.defineProperty;
|
|
10
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
12
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __esm = (fn, res) => function() {
|
|
15
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
16
|
-
};
|
|
17
|
-
var __commonJS = (cb, mod) => function() {
|
|
18
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
|
-
};
|
|
20
|
-
var __export = (target, all) => {
|
|
21
|
-
for (var name in all) __defProp(target, name, {
|
|
22
|
-
get: all[name],
|
|
23
|
-
enumerable: true
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
var __copyProps = (to, from, except, desc) => {
|
|
27
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
28
|
-
key = keys[i];
|
|
29
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
30
|
-
get: ((k) => from[k]).bind(null, key),
|
|
31
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
return to;
|
|
35
|
-
};
|
|
36
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
37
|
-
value: mod,
|
|
38
|
-
enumerable: true
|
|
39
|
-
}) : target, mod));
|
|
40
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
41
|
-
var __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeMode);
|
|
42
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
43
|
-
|
|
44
|
-
//#endregion
|
|
45
|
-
export { __commonJS, __esm, __export, __require, __toCommonJS, __toDynamicImportESM, __toESM };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
globalThis.addEventListener = () => {};
|
|
4
|
-
|
|
5
|
-
import { __commonJS, __require } from "./chunk-BeeFIeNn.js";
|
|
6
|
-
|
|
7
|
-
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.5.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js
|
|
8
|
-
var require_execAsync = __commonJS({ "../../node_modules/.pnpm/@opentelemetry+resources@2.5.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js"(exports) {
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.execAsync = void 0;
|
|
11
|
-
const child_process = __require("child_process");
|
|
12
|
-
const util = __require("util");
|
|
13
|
-
exports.execAsync = util.promisify(child_process.exec);
|
|
14
|
-
} });
|
|
15
|
-
|
|
16
|
-
//#endregion
|
|
17
|
-
export { require_execAsync };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
globalThis.addEventListener = () => {};
|
|
4
|
-
|
|
5
|
-
import { __commonJS, __require } from "./chunk-BeeFIeNn.js";
|
|
6
|
-
import { require_execAsync } from "./execAsync-Bj-9hhe9.js";
|
|
7
|
-
|
|
8
|
-
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.5.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-bsd.js
|
|
9
|
-
var require_getMachineId_bsd = __commonJS({ "../../node_modules/.pnpm/@opentelemetry+resources@2.5.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-bsd.js"(exports) {
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.getMachineId = void 0;
|
|
12
|
-
const fs_1 = __require("fs");
|
|
13
|
-
const execAsync_1 = require_execAsync();
|
|
14
|
-
const api_1 = __require("@opentelemetry/api");
|
|
15
|
-
async function getMachineId() {
|
|
16
|
-
try {
|
|
17
|
-
const result = await fs_1.promises.readFile("/etc/hostid", { encoding: "utf8" });
|
|
18
|
-
return result.trim();
|
|
19
|
-
} catch (e) {
|
|
20
|
-
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
21
|
-
}
|
|
22
|
-
try {
|
|
23
|
-
const result = await (0, execAsync_1.execAsync)("kenv -q smbios.system.uuid");
|
|
24
|
-
return result.stdout.trim();
|
|
25
|
-
} catch (e) {
|
|
26
|
-
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
27
|
-
}
|
|
28
|
-
return void 0;
|
|
29
|
-
}
|
|
30
|
-
exports.getMachineId = getMachineId;
|
|
31
|
-
} });
|
|
32
|
-
|
|
33
|
-
//#endregion
|
|
34
|
-
export default require_getMachineId_bsd();
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
globalThis.addEventListener = () => {};
|
|
4
|
-
|
|
5
|
-
import { __commonJS, __require } from "./chunk-BeeFIeNn.js";
|
|
6
|
-
import { require_execAsync } from "./execAsync-Bj-9hhe9.js";
|
|
7
|
-
|
|
8
|
-
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.5.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js
|
|
9
|
-
var require_getMachineId_darwin = __commonJS({ "../../node_modules/.pnpm/@opentelemetry+resources@2.5.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js"(exports) {
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.getMachineId = void 0;
|
|
12
|
-
const execAsync_1 = require_execAsync();
|
|
13
|
-
const api_1 = __require("@opentelemetry/api");
|
|
14
|
-
async function getMachineId() {
|
|
15
|
-
try {
|
|
16
|
-
const result = await (0, execAsync_1.execAsync)("ioreg -rd1 -c \"IOPlatformExpertDevice\"");
|
|
17
|
-
const idLine = result.stdout.split("\n").find((line) => line.includes("IOPlatformUUID"));
|
|
18
|
-
if (!idLine) return void 0;
|
|
19
|
-
const parts = idLine.split("\" = \"");
|
|
20
|
-
if (parts.length === 2) return parts[1].slice(0, -1);
|
|
21
|
-
} catch (e) {
|
|
22
|
-
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
23
|
-
}
|
|
24
|
-
return void 0;
|
|
25
|
-
}
|
|
26
|
-
exports.getMachineId = getMachineId;
|
|
27
|
-
} });
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
export default require_getMachineId_darwin();
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
globalThis.addEventListener = () => {};
|
|
4
|
-
|
|
5
|
-
import { __commonJS, __require } from "./chunk-BeeFIeNn.js";
|
|
6
|
-
|
|
7
|
-
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.5.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-linux.js
|
|
8
|
-
var require_getMachineId_linux = __commonJS({ "../../node_modules/.pnpm/@opentelemetry+resources@2.5.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-linux.js"(exports) {
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.getMachineId = void 0;
|
|
11
|
-
const fs_1 = __require("fs");
|
|
12
|
-
const api_1 = __require("@opentelemetry/api");
|
|
13
|
-
async function getMachineId() {
|
|
14
|
-
const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
|
|
15
|
-
for (const path of paths) try {
|
|
16
|
-
const result = await fs_1.promises.readFile(path, { encoding: "utf8" });
|
|
17
|
-
return result.trim();
|
|
18
|
-
} catch (e) {
|
|
19
|
-
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
20
|
-
}
|
|
21
|
-
return void 0;
|
|
22
|
-
}
|
|
23
|
-
exports.getMachineId = getMachineId;
|
|
24
|
-
} });
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
export default require_getMachineId_linux();
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
globalThis.addEventListener = () => {};
|
|
4
|
-
|
|
5
|
-
import { __commonJS, __require } from "./chunk-BeeFIeNn.js";
|
|
6
|
-
|
|
7
|
-
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.5.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-unsupported.js
|
|
8
|
-
var require_getMachineId_unsupported = __commonJS({ "../../node_modules/.pnpm/@opentelemetry+resources@2.5.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-unsupported.js"(exports) {
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.getMachineId = void 0;
|
|
11
|
-
const api_1 = __require("@opentelemetry/api");
|
|
12
|
-
async function getMachineId() {
|
|
13
|
-
api_1.diag.debug("could not read machine-id: unsupported platform");
|
|
14
|
-
return void 0;
|
|
15
|
-
}
|
|
16
|
-
exports.getMachineId = getMachineId;
|
|
17
|
-
} });
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
export default require_getMachineId_unsupported();
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
globalThis.addEventListener = () => {};
|
|
4
|
-
|
|
5
|
-
import { __commonJS, __require } from "./chunk-BeeFIeNn.js";
|
|
6
|
-
import { require_execAsync } from "./execAsync-Bj-9hhe9.js";
|
|
7
|
-
|
|
8
|
-
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.5.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-win.js
|
|
9
|
-
var require_getMachineId_win = __commonJS({ "../../node_modules/.pnpm/@opentelemetry+resources@2.5.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-win.js"(exports) {
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.getMachineId = void 0;
|
|
12
|
-
const process = __require("process");
|
|
13
|
-
const execAsync_1 = require_execAsync();
|
|
14
|
-
const api_1 = __require("@opentelemetry/api");
|
|
15
|
-
async function getMachineId() {
|
|
16
|
-
const args = "QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid";
|
|
17
|
-
let command = "%windir%\\System32\\REG.exe";
|
|
18
|
-
if (process.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process.env) command = "%windir%\\sysnative\\cmd.exe /c " + command;
|
|
19
|
-
try {
|
|
20
|
-
const result = await (0, execAsync_1.execAsync)(`${command} ${args}`);
|
|
21
|
-
const parts = result.stdout.split("REG_SZ");
|
|
22
|
-
if (parts.length === 2) return parts[1].trim();
|
|
23
|
-
} catch (e) {
|
|
24
|
-
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
25
|
-
}
|
|
26
|
-
return void 0;
|
|
27
|
-
}
|
|
28
|
-
exports.getMachineId = getMachineId;
|
|
29
|
-
} });
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
export default require_getMachineId_win();
|
|
File without changes
|
|
File without changes
|