@lightdash/common 0.1610.0 → 0.1610.1

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.
@@ -7,12 +7,14 @@ export declare enum PromotionAction {
7
7
  UPDATE = "update",
8
8
  DELETE = "delete"
9
9
  }
10
- export type PromotedSpace = Omit<SpaceSummary, 'userAccess' | 'parentSpaceUuid' | 'path'>;
10
+ export type PromotedSpace = Omit<SpaceSummary, 'userAccess'>;
11
11
  export type PromotedDashboard = DashboardDAO & {
12
12
  spaceSlug: string;
13
+ spacePath: string;
13
14
  };
14
15
  export type PromotedChart = SavedChartDAO & {
15
16
  spaceSlug: string;
17
+ spacePath: string;
16
18
  oldUuid: string;
17
19
  };
18
20
  export type PromotionChanges = {
@@ -1 +1 @@
1
- {"version":3,"file":"promotion.d.ts","sourceRoot":"","sources":["../../../src/types/promotion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,oBAAY,eAAe;IACvB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CACpB;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,CAC5B,YAAY,EACZ,YAAY,GAAG,iBAAiB,GAAG,MAAM,CAC5C,CAAC;AACF,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC3C,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,MAAM,EAAE;QACJ,MAAM,EAAE,eAAe,CAAC;QACxB,IAAI,EAAE,aAAa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AM,gBAAgB,GAAG;IAC3B,MAAM,EAAE;QACJ,MAAM,EAAE,eAAe,CAAC;QACxB,IAAI,EAAE,aAAa,CAAC;KACvB,EAAE,CAAC;IACJ,UAAU,EAAE;QACR,MAAM,EAAE,eAAe,CAAC;QACxB,IAAI,EAAE,iBAAiB,CAAC;KAC3B,EAAE,CAAC;IACJ,MAAM,EAAE;QACJ,MAAM,EAAE,eAAe,CAAC;QACxB,IAAI,EAAE,aAAa,CAAC;KACvB,EAAE,CAAC;CACP,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IAClC,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACtC,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,YAAY,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACtC,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,gBAAgB,CAAC;CAC7B,CAAC"}
@@ -1,31 +1,7 @@
1
1
  export declare const generateSlug: (name: string) => string;
2
- /**
3
- * Get all slugs with hierarchy for a given slug
4
- * For example, "parent-space/child-space" will return ["parent-space", "parent-space/child-space"]
5
- * @param slug - The slug to get the hierarchy for
6
- * @returns An array of slugs with hierarchy
7
- */
8
- export declare const getSlugsWithHierarchy: (slug: string) => string[];
9
- /**
10
- * Get the parent slug from a slug with hierarchy
11
- * For example, "parent-space/child-space" will return "parent-space"
12
- * @param slug - The slug to get the parent slug from
13
- * @returns The parent slug
14
- */
15
- export declare const getParentSlug: (slug: string) => string;
16
- /**
17
- * Get the label from a slug with hierarchy
18
- * For example, "parent-space/child-space" will return "child-space"
19
- * @param slug - The slug to get the label from
20
- * @returns The label
21
- */
22
- export declare const getLabelFromSlug: (slug: string) => string;
23
- /**
24
- * Get the ltree path from a slug with hierarchy
25
- * For example, "parent-space/child-space" will return "parent_space.child_space"
26
- * Verifies that each slug is a valid PostgreSQL ltree label (A-Za-z0-9_)
27
- * @param slug - The slug to get the ltree path from
28
- * @returns The ltree path
29
- */
30
2
  export declare const getLtreePathFromSlug: (slug: string) => string;
3
+ export declare const getLtreePathFromContentAsCodePath: (path: string) => string;
4
+ export declare const getContentAsCodePathFromLtreePath: (path: string) => string;
5
+ export declare const getDeepestPaths: (paths: string[]) => string[];
6
+ export declare const isSubPath: (path: string, subPath: string) => boolean;
31
7
  //# sourceMappingURL=slugs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"slugs.d.ts","sourceRoot":"","sources":["../../../src/utils/slugs.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,YAAY,SAAU,MAAM,WAQxC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,SAAU,MAAM,aAMxC,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,aAAa,SAAU,MAAM,WACA,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,SAAU,MAAM,WAAkC,CAAC;AAEhF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,SAAU,MAAM,WAKhD,CAAC"}
1
+ {"version":3,"file":"slugs.d.ts","sourceRoot":"","sources":["../../../src/utils/slugs.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,YAAY,SAAU,MAAM,WAQxC,CAAC;AAEF,eAAO,MAAM,oBAAoB,SAAU,MAAM,WAQhD,CAAC;AAEF,eAAO,MAAM,iCAAiC,SAAU,MAAM,WACf,CAAC;AAEhD,eAAO,MAAM,iCAAiC,SAAU,MAAM,WACf,CAAC;AAEhD,eAAO,MAAM,eAAe,UAAW,MAAM,EAAE,KAAG,MAAM,EA4BvD,CAAC;AAEF,eAAO,MAAM,SAAS,SAAU,MAAM,WAAW,MAAM,YACK,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/common",
3
- "version": "0.1610.0",
3
+ "version": "0.1610.1",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",