@forge/util
2.0.1-experimental-78908582.0.1-experimental-04cc2b9
packages/ari/ml-registry/index.js~
packages/ari/ml-registry/index.jsModified+6−111
Index: package/packages/ari/ml-registry/index.js
===================================================================
--- package/packages/ari/ml-registry/index.js
+++ package/packages/ari/ml-registry/index.js
@@ -16,11 +16,9 @@
// src/ml-registry/index.ts
var ml_registry_exports = {};
__export(ml_registry_exports, {
- MlRegistryArtifactAri: () => MlRegistryArtifactAri,
- MlRegistryComponentAri: () => MlRegistryComponentAri,
- MlRegistryComponentVersionAri: () => MlRegistryComponentVersionAri
+ MlRegistryArtifactAri: () => MlRegistryArtifactAri
});
module.exports = __toCommonJS(ml_registry_exports);
// src/errors.ts
@@ -284,20 +282,23 @@
var mlRegistryArtifactAriStaticOpts = {
qualifier: "ari",
platformQualifier: "cloud",
cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
resourceOwner: MlRegistryArtifactAriResourceOwner,
resourceType: MlRegistryArtifactAriResourceType,
resourceIdSlug: "{artifactId}",
resourceIdSegmentFormats: {
artifactId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/
+ // eslint-disable-line no-useless-escape
}
};
// src/ml-registry/artifact/index.ts
var MlRegistryArtifactAri = class _MlRegistryArtifactAri extends RegisteredAri {
constructor(opts) {
- super(opts), this._artifactId = opts.resourceIdSegmentValues.artifactId;
+ super(opts);
+ this._artifactId = opts.resourceIdSegmentValues.artifactId;
}
get artifactId() {
return this._artifactId;
}
@@ -324,114 +325,8 @@
artifactId: this.artifactId
};
}
};
-
-// src/ml-registry/component/types.ts
-var MlRegistryComponentAriResourceOwner = "ml-registry", MlRegistryComponentAriResourceType = "component";
-
-// 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
- };
- }
-};
-
-// src/ml-registry/component-version/types.ts
-var MlRegistryComponentVersionAriResourceOwner = "ml-registry", MlRegistryComponentVersionAriResourceType = "component-version";
-
-// src/ml-registry/component-version/manifest.ts
-var mlRegistryComponentVersionAriStaticOpts = {
- qualifier: "ari",
- platformQualifier: "cloud",
- cloudId: new RegExp("^$"),
- resourceOwner: MlRegistryComponentVersionAriResourceOwner,
- resourceType: MlRegistryComponentVersionAriResourceType,
- resourceIdSlug: "{componentId}/{versionId}",
- 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}/,
- versionId: /[0-9]+/
- }
-};
-
-// src/ml-registry/component-version/index.ts
-var MlRegistryComponentVersionAri = class _MlRegistryComponentVersionAri extends RegisteredAri {
- constructor(opts) {
- super(opts), this._componentId = opts.resourceIdSegmentValues.componentId, this._versionId = opts.resourceIdSegmentValues.versionId;
- }
- get componentId() {
- return this._componentId;
- }
- get versionId() {
- return this._versionId;
- }
- static create(opts) {
- let derivedOpts = {
- qualifier: mlRegistryComponentVersionAriStaticOpts.qualifier,
- platformQualifier: mlRegistryComponentVersionAriStaticOpts.platformQualifier,
- cloudId: void 0,
- resourceOwner: mlRegistryComponentVersionAriStaticOpts.resourceOwner,
- resourceType: mlRegistryComponentVersionAriStaticOpts.resourceType,
- resourceId: `${opts.componentId}/${opts.versionId}`,
- resourceIdSegmentValues: {
- componentId: opts.componentId,
- versionId: opts.versionId
- }
- }, ariOpts = AriParser.fromOpts(derivedOpts, mlRegistryComponentVersionAriStaticOpts);
- return new _MlRegistryComponentVersionAri(ariOpts);
- }
- static parse(maybeAri) {
- let opts = AriParser.fromString(maybeAri, mlRegistryComponentVersionAriStaticOpts);
- return new _MlRegistryComponentVersionAri(opts);
- }
- getVariables() {
- return {
- componentId: this.componentId,
- versionId: this.versionId
- };
- }
-};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
- MlRegistryArtifactAri,
- MlRegistryComponentAri,
- MlRegistryComponentVersionAri
+ MlRegistryArtifactAri
});