forgeos 0.1.0-alpha.47 → 0.1.0-alpha.49

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.
@@ -111,6 +111,10 @@ export const FORGE_RELEASE_GENERATED_DRIFT =
111
111
  export const FORGE_RELEASE_ID_MISSING = "FORGE_RELEASE_ID_MISSING" as const;
112
112
  export const FORGE_RELEASE_PACKAGE_PACK_FAILED =
113
113
  "FORGE_RELEASE_PACKAGE_PACK_FAILED" as const;
114
+ export const FORGE_RELEASE_NPM_DIST_TAG_STALE =
115
+ "FORGE_RELEASE_NPM_DIST_TAG_STALE" as const;
116
+ export const FORGE_RELEASE_NPM_DIST_TAG_CHECK_FAILED =
117
+ "FORGE_RELEASE_NPM_DIST_TAG_CHECK_FAILED" as const;
114
118
  export const FORGE_SOURCEMAP_PUBLIC_EXPOSURE =
115
119
  "FORGE_SOURCEMAP_PUBLIC_EXPOSURE" as const;
116
120
  export const FORGE_SOURCEMAP_UPLOAD_MISSING =
@@ -475,6 +479,8 @@ export const DIAGNOSTIC_CODES = [
475
479
  FORGE_RELEASE_GENERATED_DRIFT,
476
480
  FORGE_RELEASE_ID_MISSING,
477
481
  FORGE_RELEASE_PACKAGE_PACK_FAILED,
482
+ FORGE_RELEASE_NPM_DIST_TAG_STALE,
483
+ FORGE_RELEASE_NPM_DIST_TAG_CHECK_FAILED,
478
484
  FORGE_SOURCEMAP_PUBLIC_EXPOSURE,
479
485
  FORGE_SOURCEMAP_UPLOAD_MISSING,
480
486
  FORGE_SOURCEMAP_UPLOAD_FAILED,
@@ -50,6 +50,10 @@ function singularResourceName(name: string): string {
50
50
  return name;
51
51
  }
52
52
 
53
+ function idFieldForResource(slug: string): string {
54
+ return `${slug.charAt(0).toLowerCase()}${slug.slice(1)}Id`;
55
+ }
56
+
53
57
  function permissionsFromApp(input: IntegrationTemplateInput): string[] {
54
58
  const permissions = new Set<string>();
55
59
  for (const symbol of input.appGraph?.symbols ?? []) {
@@ -83,6 +87,24 @@ function resourceTypesFromApp(input: IntegrationTemplateInput): Array<{ slug: st
83
87
  const slug = singularResourceName(table.name);
84
88
  resourceTypes.set(slug, { slug, name: toTitle(slug), parent: "organization" });
85
89
  }
90
+ for (const table of tenantTables) {
91
+ const slug = singularResourceName(table.name);
92
+ const current = resourceTypes.get(slug);
93
+ if (!current || slug === "organization") {
94
+ continue;
95
+ }
96
+ const parent = [...resourceTypes.keys()]
97
+ .filter((candidate) => candidate !== slug && candidate !== "organization")
98
+ .find((candidate) =>
99
+ table.fields.some((field) =>
100
+ field.name === idFieldForResource(candidate) ||
101
+ field.name === `${candidate}_id`
102
+ )
103
+ );
104
+ if (parent) {
105
+ resourceTypes.set(slug, { ...current, parent });
106
+ }
107
+ }
86
108
  return [...resourceTypes.values()].sort((a, b) => a.slug.localeCompare(b.slug));
87
109
  }
88
110
 
@@ -1,3 +1,3 @@
1
- export const FORGEOS_VERSION = "0.1.0-alpha.47";
1
+ export const FORGEOS_VERSION = "0.1.0-alpha.49";
2
2
  export const GENERATOR_VERSION = FORGEOS_VERSION;
3
3
  export const CLI_VERSION = FORGEOS_VERSION;