@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-VL5E5UFX.mjs+
packages/ari/chunk-VL5E5UFX.mjsNew file+60
Index: package/packages/ari/chunk-VL5E5UFX.mjs
===================================================================
--- package/packages/ari/chunk-VL5E5UFX.mjs
+++ package/packages/ari/chunk-VL5E5UFX.mjs
@@ -0,0 +1,60 @@
+import {
+ MlRegistryComponentAriResourceOwner,
+ MlRegistryComponentAriResourceType
+} from "./chunk-64J5NG5L.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/ml-registry/component/manifest.ts
+var mlRegistryComponentAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ resourceOwner: MlRegistryComponentAriResourceOwner,
+ resourceType: MlRegistryComponentAriResourceType,
+ resourceIdSlug: "{componentId}",
+ resourceIdSegmentFormats: {
+ componentId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/
+ }
+};
+
+// src/ml-registry/component/index.ts
+var MlRegistryComponentAri = class _MlRegistryComponentAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._componentId = opts.resourceIdSegmentValues.componentId;
+ }
+ get componentId() {
+ return this._componentId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: mlRegistryComponentAriStaticOpts.qualifier,
+ platformQualifier: mlRegistryComponentAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: mlRegistryComponentAriStaticOpts.resourceOwner,
+ resourceType: mlRegistryComponentAriStaticOpts.resourceType,
+ resourceId: `${opts.componentId}`,
+ resourceIdSegmentValues: {
+ componentId: opts.componentId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, mlRegistryComponentAriStaticOpts);
+ return new _MlRegistryComponentAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, mlRegistryComponentAriStaticOpts);
+ return new _MlRegistryComponentAri(opts);
+ }
+ getVariables() {
+ return {
+ componentId: this.componentId
+ };
+ }
+};
+
+export {
+ MlRegistryComponentAri
+};