@knapsack/core 4.100.4--canary.8032.b98cca2.0 → 4.100.4--canary.8027.afcc962.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 +20 -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,24 @@ 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
|
+
* Mirrors the DB CHECK constraint `readOnlyDeploys_slug_not_reserved`. Keep the
|
|
20
|
+
* two in step. The constraint is the last line of defence; this is what lets a
|
|
21
|
+
* caller be told which rule it broke before an insert is ever attempted.
|
|
22
|
+
*/
|
|
23
|
+
export declare const RESERVED_INSTANCE_SLUGS: readonly ["latest", "draft"];
|
|
24
|
+
export type ReservedInstanceSlug = (typeof RESERVED_INSTANCE_SLUGS)[number];
|
|
25
|
+
export declare function isReservedInstanceSlug(slug: string): slug is ReservedInstanceSlug;
|
|
26
|
+
/**
|
|
27
|
+
* A read-only deploy slug must be URL-safe: lowercase alphanumerics with
|
|
28
|
+
* internal hyphens only, no leading or trailing hyphen, at least one character.
|
|
29
|
+
*
|
|
30
|
+
* Mirrors the DB CHECK constraint `readOnlyDeploys_slug_url_safe`.
|
|
31
|
+
*/
|
|
32
|
+
export declare const READ_ONLY_DEPLOY_SLUG_REGEX: RegExp;
|
|
33
|
+
export declare function isUrlSafeDeploySlug(slug: string): boolean;
|
|
14
34
|
//# 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,KAAG,OAA+D,CAAC;AAEpE,eAAO,MAAM,wBAAw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