@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-VRVZLWWU.mjs+
packages/ari/chunk-VRVZLWWU.mjsNew file+60
Index: package/packages/ari/chunk-VRVZLWWU.mjs
===================================================================
--- package/packages/ari/chunk-VRVZLWWU.mjs
+++ package/packages/ari/chunk-VRVZLWWU.mjs
@@ -0,0 +1,60 @@
+import {
+ GithubGithubRepositoryAriResourceOwner,
+ GithubGithubRepositoryAriResourceType
+} from "./chunk-PLNY4YWF.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/github.github/repository/manifest.ts
+var githubGithubRepositoryAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "third-party",
+ cloudId: new RegExp("^$"),
+ resourceOwner: GithubGithubRepositoryAriResourceOwner,
+ resourceType: GithubGithubRepositoryAriResourceType,
+ resourceIdSlug: "{repositoryId}",
+ resourceIdSegmentFormats: {
+ repositoryId: /[0-9]+/
+ }
+};
+
+// src/github.github/repository/index.ts
+var GithubGithubRepositoryAri = class _GithubGithubRepositoryAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._repositoryId = opts.resourceIdSegmentValues.repositoryId;
+ }
+ get repositoryId() {
+ return this._repositoryId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: githubGithubRepositoryAriStaticOpts.qualifier,
+ platformQualifier: githubGithubRepositoryAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: githubGithubRepositoryAriStaticOpts.resourceOwner,
+ resourceType: githubGithubRepositoryAriStaticOpts.resourceType,
+ resourceId: `${opts.repositoryId}`,
+ resourceIdSegmentValues: {
+ repositoryId: opts.repositoryId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, githubGithubRepositoryAriStaticOpts);
+ return new _GithubGithubRepositoryAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, githubGithubRepositoryAriStaticOpts);
+ return new _GithubGithubRepositoryAri(opts);
+ }
+ getVariables() {
+ return {
+ repositoryId: this.repositoryId
+ };
+ }
+};
+
+export {
+ GithubGithubRepositoryAri
+};