@caelo-cms/shared 0.10.66 → 0.10.67
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/cloud-shell-install.d.ts +4 -7
- package/dist/cloud-shell-install.d.ts.map +1 -1
- package/dist/cloud-shell-install.js +14 -19
- package/dist/cloud-shell-install.js.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/cloud-shell-install.test.ts +5 -10
- package/src/cloud-shell-install.ts +14 -21
- package/src/version.ts +1 -1
|
@@ -5,15 +5,12 @@ export declare const CLOUD_SHELL_BUTTON_IMAGE = "https://gstatic.com/cloudssh/im
|
|
|
5
5
|
/** Providers the Cloud Shell install covers (one tutorial each). */
|
|
6
6
|
export type CloudShellProvider = "gcp" | "gcp-firebase";
|
|
7
7
|
/**
|
|
8
|
-
* The Cloud Shell install link
|
|
8
|
+
* The Cloud Shell install link: always the newest stable release.
|
|
9
9
|
*
|
|
10
|
-
* @
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @example cloudShellInstallUrl("0.10.47", "gcp")
|
|
14
|
-
* // → "https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/caelo-cms/install&cloudshell_git_branch=release-v0.10.47&cloudshell_tutorial=gcp.md"
|
|
10
|
+
* @example cloudShellInstallUrl("gcp")
|
|
11
|
+
* // → "https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/caelo-cms/install&cloudshell_git_branch=main&cloudshell_tutorial=gcp.md"
|
|
15
12
|
*/
|
|
16
|
-
export declare function cloudShellInstallUrl(
|
|
13
|
+
export declare function cloudShellInstallUrl(provider: CloudShellProvider): string;
|
|
17
14
|
/**
|
|
18
15
|
* The first release whose `release-v<version>` branch in the install
|
|
19
16
|
* repository ships the break-glass upgrade (#816): `upgrade-gcp.md`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-shell-install.d.ts","sourceRoot":"","sources":["../src/cloud-shell-install.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloud-shell-install.d.ts","sourceRoot":"","sources":["../src/cloud-shell-install.ts"],"names":[],"mappings":"AAiBA,oDAAoD;AACpD,eAAO,MAAM,wBAAwB,yCAAyC,CAAC;AAE/E,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,qDAAqD,CAAC;AAE3F,oEAAoE;AACpE,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,cAAc,CAAC;AAIxD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,CAOzE;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iCAAiC,YAAY,CAAC;AAE3D;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,GAAG,MAAM,GAAG,IAAI,CAUjG;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,GAAG,MAAM,CAOT"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MPL-2.0
|
|
2
2
|
/**
|
|
3
|
-
* The "Open in Google Cloud Shell"
|
|
3
|
+
* The "Open in Google Cloud Shell" links (epic #696, Phase 3).
|
|
4
4
|
*
|
|
5
|
-
* The link opens github.com/caelo-cms/install
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
5
|
+
* The INSTALL link names no version: it opens github.com/caelo-cms/install
|
|
6
|
+
* on `main`, whose `run.sh` resolves the newest stable release itself (npm
|
|
7
|
+
* `latest`) and verifies it before anything runs, so the link is right for
|
|
8
|
+
* every release and never moves. The UPGRADE link names one target release:
|
|
9
|
+
* it opens that release's `release-v<version>` branch (created by the
|
|
10
|
+
* install repository's track-release workflow, never moved), and `run.sh`
|
|
11
|
+
* there takes the version from the branch name. One builder per link for
|
|
12
|
+
* every place that shows it, so they can't drift.
|
|
11
13
|
*/
|
|
12
14
|
import { isNewerVersion } from "./version.js";
|
|
13
15
|
/** The repository the Cloud Shell button clones. */
|
|
@@ -16,23 +18,16 @@ export const CLOUD_SHELL_INSTALL_REPO = "https://github.com/caelo-cms/install";
|
|
|
16
18
|
export const CLOUD_SHELL_BUTTON_IMAGE = "https://gstatic.com/cloudssh/images/open-btn.svg";
|
|
17
19
|
const STABLE = /^v?(\d+\.\d+\.\d+)$/;
|
|
18
20
|
/**
|
|
19
|
-
* The Cloud Shell install link
|
|
21
|
+
* The Cloud Shell install link: always the newest stable release.
|
|
20
22
|
*
|
|
21
|
-
* @
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* @example cloudShellInstallUrl("0.10.47", "gcp")
|
|
25
|
-
* // → "https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/caelo-cms/install&cloudshell_git_branch=release-v0.10.47&cloudshell_tutorial=gcp.md"
|
|
23
|
+
* @example cloudShellInstallUrl("gcp")
|
|
24
|
+
* // → "https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/caelo-cms/install&cloudshell_git_branch=main&cloudshell_tutorial=gcp.md"
|
|
26
25
|
*/
|
|
27
|
-
export function cloudShellInstallUrl(
|
|
28
|
-
const m = STABLE.exec(version);
|
|
29
|
-
if (!m) {
|
|
30
|
-
throw new Error(`no Cloud Shell install link for "${version}": only stable releases are pinned in ${CLOUD_SHELL_INSTALL_REPO}`);
|
|
31
|
-
}
|
|
26
|
+
export function cloudShellInstallUrl(provider) {
|
|
32
27
|
return [
|
|
33
28
|
"https://shell.cloud.google.com/cloudshell/editor",
|
|
34
29
|
`?cloudshell_git_repo=${CLOUD_SHELL_INSTALL_REPO}`,
|
|
35
|
-
|
|
30
|
+
"&cloudshell_git_branch=main",
|
|
36
31
|
`&cloudshell_tutorial=${provider}.md`,
|
|
37
32
|
].join("");
|
|
38
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-shell-install.js","sourceRoot":"","sources":["../src/cloud-shell-install.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC
|
|
1
|
+
{"version":3,"file":"cloud-shell-install.js","sourceRoot":"","sources":["../src/cloud-shell-install.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,oDAAoD;AACpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,sCAAsC,CAAC;AAE/E,yEAAyE;AACzE,MAAM,CAAC,MAAM,wBAAwB,GAAG,kDAAkD,CAAC;AAK3F,MAAM,MAAM,GAAG,qBAAqB,CAAC;AAErC;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAA4B;IAC/D,OAAO;QACL,kDAAkD;QAClD,wBAAwB,wBAAwB,EAAE;QAClD,6BAA6B;QAC7B,wBAAwB,QAAQ,KAAK;KACtC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACb,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,SAAS,CAAC;AAE3D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe,EAAE,QAA4B;IAChF,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/B,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACzB,IAAI,cAAc,CAAC,iCAAiC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACzE,OAAO;QACL,kDAAkD;QAClD,wBAAwB,wBAAwB,EAAE;QAClD,mCAAmC,CAAC,CAAC,CAAC,CAAC,EAAE;QACzC,gCAAgC,QAAQ,KAAK;KAC9C,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACb,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAGxC;IACC,OAAO;QACL,kBAAkB;QAClB,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACxD,WAAW;QACX,MAAM,CAAC,OAAO;KACf,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* Format: SemVer 2.0.0. Pre-1.0 minor bumps are breaking; post-1.0
|
|
20
20
|
* follow standard SemVer.
|
|
21
21
|
*/
|
|
22
|
-
export declare const CAELO_VERSION = "0.10.
|
|
22
|
+
export declare const CAELO_VERSION = "0.10.67";
|
|
23
23
|
/**
|
|
24
24
|
* Deprecated alias for back-compat — early P17 work spelled this
|
|
25
25
|
* `CALEO_VERSION` (typo of "Caelo"). New code should import
|
|
@@ -31,7 +31,7 @@ export declare const CAELO_VERSION = "0.10.66";
|
|
|
31
31
|
*
|
|
32
32
|
* @deprecated use CAELO_VERSION
|
|
33
33
|
*/
|
|
34
|
-
export declare const CALEO_VERSION = "0.10.
|
|
34
|
+
export declare const CALEO_VERSION = "0.10.67";
|
|
35
35
|
/**
|
|
36
36
|
* Parsed shape — major/minor/patch + optional pre-release tag.
|
|
37
37
|
* Stable interface for callers that need to feature-gate (rare —
|
package/dist/version.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* Format: SemVer 2.0.0. Pre-1.0 minor bumps are breaking; post-1.0
|
|
21
21
|
* follow standard SemVer.
|
|
22
22
|
*/
|
|
23
|
-
export const CAELO_VERSION = "0.10.
|
|
23
|
+
export const CAELO_VERSION = "0.10.67";
|
|
24
24
|
/**
|
|
25
25
|
* Deprecated alias for back-compat — early P17 work spelled this
|
|
26
26
|
* `CALEO_VERSION` (typo of "Caelo"). New code should import
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caelo-cms/shared",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.67",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"description": "Shared Zod schemas + types + the two-pass HTML composer used by every Caelo CMS workspace package. Stable enough for plugin authors and embedders to depend on directly.",
|
|
@@ -9,19 +9,14 @@ import {
|
|
|
9
9
|
} from "./cloud-shell-install.js";
|
|
10
10
|
|
|
11
11
|
describe("cloudShellInstallUrl", () => {
|
|
12
|
-
it("
|
|
13
|
-
expect(cloudShellInstallUrl("
|
|
14
|
-
"https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/caelo-cms/install&cloudshell_git_branch=
|
|
12
|
+
it("names no version: the install repo's main installs the newest release", () => {
|
|
13
|
+
expect(cloudShellInstallUrl("gcp")).toBe(
|
|
14
|
+
"https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/caelo-cms/install&cloudshell_git_branch=main&cloudshell_tutorial=gcp.md",
|
|
15
15
|
);
|
|
16
|
-
expect(cloudShellInstallUrl("
|
|
17
|
-
"cloudshell_git_branch=
|
|
16
|
+
expect(cloudShellInstallUrl("gcp-firebase")).toContain(
|
|
17
|
+
"cloudshell_git_branch=main&cloudshell_tutorial=gcp-firebase.md",
|
|
18
18
|
);
|
|
19
19
|
});
|
|
20
|
-
|
|
21
|
-
it("refuses pre-releases and garbage: they have no pinned branch", () => {
|
|
22
|
-
expect(() => cloudShellInstallUrl("0.11.0-rc.1", "gcp")).toThrow(/only stable releases/);
|
|
23
|
-
expect(() => cloudShellInstallUrl("latest", "gcp")).toThrow();
|
|
24
|
-
});
|
|
25
20
|
});
|
|
26
21
|
|
|
27
22
|
describe("cloudShellUpgradeUrl (#816)", () => {
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MPL-2.0
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* The "Open in Google Cloud Shell"
|
|
4
|
+
* The "Open in Google Cloud Shell" links (epic #696, Phase 3).
|
|
5
5
|
*
|
|
6
|
-
* The link opens github.com/caelo-cms/install
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
6
|
+
* The INSTALL link names no version: it opens github.com/caelo-cms/install
|
|
7
|
+
* on `main`, whose `run.sh` resolves the newest stable release itself (npm
|
|
8
|
+
* `latest`) and verifies it before anything runs, so the link is right for
|
|
9
|
+
* every release and never moves. The UPGRADE link names one target release:
|
|
10
|
+
* it opens that release's `release-v<version>` branch (created by the
|
|
11
|
+
* install repository's track-release workflow, never moved), and `run.sh`
|
|
12
|
+
* there takes the version from the branch name. One builder per link for
|
|
13
|
+
* every place that shows it, so they can't drift.
|
|
12
14
|
*/
|
|
13
15
|
|
|
14
16
|
import { isNewerVersion } from "./version.js";
|
|
@@ -25,25 +27,16 @@ export type CloudShellProvider = "gcp" | "gcp-firebase";
|
|
|
25
27
|
const STABLE = /^v?(\d+\.\d+\.\d+)$/;
|
|
26
28
|
|
|
27
29
|
/**
|
|
28
|
-
* The Cloud Shell install link
|
|
30
|
+
* The Cloud Shell install link: always the newest stable release.
|
|
29
31
|
*
|
|
30
|
-
* @
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* @example cloudShellInstallUrl("0.10.47", "gcp")
|
|
34
|
-
* // → "https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/caelo-cms/install&cloudshell_git_branch=release-v0.10.47&cloudshell_tutorial=gcp.md"
|
|
32
|
+
* @example cloudShellInstallUrl("gcp")
|
|
33
|
+
* // → "https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/caelo-cms/install&cloudshell_git_branch=main&cloudshell_tutorial=gcp.md"
|
|
35
34
|
*/
|
|
36
|
-
export function cloudShellInstallUrl(
|
|
37
|
-
const m = STABLE.exec(version);
|
|
38
|
-
if (!m) {
|
|
39
|
-
throw new Error(
|
|
40
|
-
`no Cloud Shell install link for "${version}": only stable releases are pinned in ${CLOUD_SHELL_INSTALL_REPO}`,
|
|
41
|
-
);
|
|
42
|
-
}
|
|
35
|
+
export function cloudShellInstallUrl(provider: CloudShellProvider): string {
|
|
43
36
|
return [
|
|
44
37
|
"https://shell.cloud.google.com/cloudshell/editor",
|
|
45
38
|
`?cloudshell_git_repo=${CLOUD_SHELL_INSTALL_REPO}`,
|
|
46
|
-
|
|
39
|
+
"&cloudshell_git_branch=main",
|
|
47
40
|
`&cloudshell_tutorial=${provider}.md`,
|
|
48
41
|
].join("");
|
|
49
42
|
}
|