@knapsack/core 4.100.6--canary.8024.59ffa7c.0 → 4.100.6--canary.8027.a77ab3a.0
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.
- package/dist/branches.d.ts +22 -0
- package/dist/branches.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/branches.d.ts
CHANGED
|
@@ -11,4 +11,26 @@ export declare const canInstanceStatusEdit: ({ instanceStatus, }: {
|
|
|
11
11
|
export declare const canInstanceStatusPublish: ({ instanceStatus, }: {
|
|
12
12
|
instanceStatus: SiteInstanceStatuses_Enum;
|
|
13
13
|
}) => boolean;
|
|
14
|
+
/**
|
|
15
|
+
* URL slugs that can never name a read-only deploy, because the router already
|
|
16
|
+
* gives them meaning: `latest` is the editable Cloud Authoring environment and
|
|
17
|
+
* `draft` is a reserved instance tag that site loading throws on.
|
|
18
|
+
*
|
|
19
|
+
* The single source of truth for this rule. Enforced by the admin mutation that
|
|
20
|
+
* writes `readOnlyDeploys`, and used by site loading to decide whether a URL
|
|
21
|
+
* segment is even a candidate for slug resolution. Deliberately not a database
|
|
22
|
+
* constraint, so the rule can change without shipping a migration.
|
|
23
|
+
*/
|
|
24
|
+
export declare const RESERVED_INSTANCE_SLUGS: readonly ["latest", "draft"];
|
|
25
|
+
export type ReservedInstanceSlug = (typeof RESERVED_INSTANCE_SLUGS)[number];
|
|
26
|
+
export declare function isReservedInstanceSlug(slug: string): slug is ReservedInstanceSlug;
|
|
27
|
+
/**
|
|
28
|
+
* A read-only deploy slug must be URL-safe: lowercase alphanumerics with
|
|
29
|
+
* internal hyphens only, no leading or trailing hyphen, at least one character.
|
|
30
|
+
*
|
|
31
|
+
* The single source of truth for this rule, enforced by the admin mutation that
|
|
32
|
+
* writes `readOnlyDeploys`.
|
|
33
|
+
*/
|
|
34
|
+
export declare const READ_ONLY_DEPLOY_SLUG_REGEX: RegExp;
|
|
35
|
+
export declare function isUrlSafeDeploySlug(slug: string): boolean;
|
|
14
36
|
//# sourceMappingURL=branches.d.ts.map
|
package/dist/branches.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branches.d.ts","sourceRoot":"","sources":["../src/branches.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAE7E,eAAO,MAAM,2BAA2B,EAAE,yBAAyB,EAElE,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,yBAAyB,EAGrE,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,yBAAyB,EACpC,CAAC;AAEzC,eAAO,MAAM,2BAA2B,GAAI,qBAEzC;IACD,cAAc,EAAE,yBAAyB,CAAC;CAC3C,KAAG,OAAyE,CAAC;AAE9E,eAAO,MAAM,qBAAqB,GAAI,qBAEnC;IACD,cAAc,EAAE,yBAAyB,CAAC;CAC3C,KAAG,OAA+D,CAAC;AAEpE,eAAO,MAAM,wBAAwB,GAAI,qBAEtC;IACD,cAAc,EAAE,yBAAyB,CAAC;CAC3C,KAAG,OAAkE,CAAC"}
|
|
1
|
+
{"version":3,"file":"branches.d.ts","sourceRoot":"","sources":["../src/branches.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAE7E,eAAO,MAAM,2BAA2B,EAAE,yBAAyB,EAElE,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,yBAAyB,EAGrE,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,yBAAyB,EACpC,CAAC;AAEzC,eAAO,MAAM,2BAA2B,GAAI,qBAEzC;IACD,cAAc,EAAE,yBAAyB,CAAC;CAC3C,KAAG,OAAyE,CAAC;AAE9E,eAAO,MAAM,qBAAqB,GAAI,qBAEnC;IACD,cAAc,EAAE,yBAAyB,CAAC;CAC3C,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