npm package diff

Package: @forge/util

Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31

File: package/packages/ari/chunk-MFPTPQCO.mjs

Index: package/packages/ari/chunk-MFPTPQCO.mjs
===================================================================
--- package/packages/ari/chunk-MFPTPQCO.mjs
+++ package/packages/ari/chunk-MFPTPQCO.mjs
@@ -0,0 +1,70 @@
+import {
+  WorkdayWorkerAriResourceOwner,
+  WorkdayWorkerAriResourceType
+} from "./chunk-A4ROCE3Q.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/workday/worker/manifest.ts
+var workdayWorkerAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "third-party",
+  cloudId: new RegExp("^$"),
+  // eslint-disable-line no-useless-escape
+  resourceOwner: WorkdayWorkerAriResourceOwner,
+  resourceType: WorkdayWorkerAriResourceType,
+  resourceIdSlug: "{workdayTenantKey}/{workerWorkdayId}",
+  resourceIdSegmentFormats: {
+    workdayTenantKey: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/,
+    // eslint-disable-line no-useless-escape
+    workerWorkdayId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+    // eslint-disable-line no-useless-escape
+  }
+};
+
+// src/workday/worker/index.ts
+var WorkdayWorkerAri = class _WorkdayWorkerAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts);
+    this._workdayTenantKey = opts.resourceIdSegmentValues.workdayTenantKey, this._workerWorkdayId = opts.resourceIdSegmentValues.workerWorkdayId;
+  }
+  get workdayTenantKey() {
+    return this._workdayTenantKey;
+  }
+  get workerWorkdayId() {
+    return this._workerWorkdayId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: workdayWorkerAriStaticOpts.qualifier,
+      platformQualifier: workdayWorkerAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: workdayWorkerAriStaticOpts.resourceOwner,
+      resourceType: workdayWorkerAriStaticOpts.resourceType,
+      resourceId: `${opts.workdayTenantKey}/${opts.workerWorkdayId}`,
+      resourceIdSegmentValues: {
+        workdayTenantKey: opts.workdayTenantKey,
+        workerWorkdayId: opts.workerWorkdayId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, workdayWorkerAriStaticOpts);
+    return new _WorkdayWorkerAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, workdayWorkerAriStaticOpts);
+    return new _WorkdayWorkerAri(opts);
+  }
+  getVariables() {
+    return {
+      workdayTenantKey: this.workdayTenantKey,
+      workerWorkdayId: this.workerWorkdayId
+    };
+  }
+};
+
+export {
+  WorkdayWorkerAri
+};